【问题标题】:css textbox border on google chrome谷歌浏览器上的CSS文本框边框
【发布时间】:2016-12-10 20:03:58
【问题描述】:

我想只保留文本框的底部边框。这是我的css-

    input[type="text"],input[type="password"] {          
        border:0px;
        border-bottom:1px solid black;
    }

    input[type="text"]:focus, input[type="password"]:focus {    
         border-bottom:2px solid green;                          
    }

这是它的外观-

在铬上-

在火狐上-

在 chrome 上,文本框在获得焦点时会得到一个轮廓。有什么办法可以去掉吗?

【问题讨论】:

  • 此大纲旨在显示表单元素对用户具有焦点。 outline:none; 将删除它。真的那么糟糕吗? :)

标签: css google-chrome border


【解决方案1】:
input[type="text"]:focus, input[type="password"]:focus {    
       outline:none;
     border-bottom:2px solid green;                          
}

你缺少大纲:没有。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-04-21
    • 1970-01-01
    • 1970-01-01
    • 2014-11-29
    • 2011-01-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多