删除bootstrap 3上文本输入的边框

时间:2016-06-03 23:05:28

标签: forms twitter-bootstrap css3 input

我尝试使用bootstrap 3删除文本输入字段的顶部,右侧和左侧边框。我的选择器是:

input[type="text"] {
border-top: 0;
border-right: 0;
border-left: 0;

}

它仍然显示(铬合金)一条细线。

enter image description here

我不确定如何让鬼线消失

3 个答案:

答案 0 :(得分:7)

您确实从左上角和右上角移除了边框。那"鬼线"你看,它是插入的阴影。您也可以删除它

input[type="text"] {
     border-top: 0;
     border-right: 0;
     border-left: 0;

     -webkit-box-shadow: none;
     box-shadow: none;
}

如果您想在用户"关注"时删除它该领域

input[type="text"]:focus {
     -webkit-box-shadow: none;
     box-shadow: none;
}

答案 1 :(得分:2)

将此内容写入您的css文件。

input {
    border: none;
}

如果无效,请分享您的HTML代码。

答案 2 :(得分:1)

如果您的表单使用了标记<fieldset>,请尝试删除其边框:

fieldset {  
  border: 0;
}