zoukankan      html  css  js  c++  java
  • 谷歌浏览器表单自动填充颜色修改(antd)

    antd中设置了-webkit-autofill,发现效果并不理想。后来发现antd中针对ant-input有别的设置,代码如下:

    //global.less
    
    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus,
    input:-webkit-autofill:active {
        -webkit-box-shadow: 0 0 0px 1000px rgba(225, 233, 255, 0) inset !important; //设置为透明色时不要写transparent,否则不生效,可自行调整其他颜色

    -webkit-text-fill-color: #fff !important; //字体颜色
        -webkit-transition-delay: 99999s;
        -webkit-transition: color 99999s ease-out, background-color 99999s ease-out;
    }
    
    .ant-input-affix-wrapper input.ant-input:focus { //这个在antd中需要单独覆盖
        background: transparent !important;
        box-shadow: none !important;
    }

     如有问题,还请及时指正。

  • 相关阅读:
    买不到的数目
    逆波兰表达式
    颠倒的价牌
    排它平方数
    寒假作业
    搭积木
    网友年龄
    九宫重排
    格子刷油漆
    高僧斗法
  • 原文地址:https://www.cnblogs.com/fmixue/p/15684180.html
Copyright © 2011-2022 走看看