覆盖twitter bootstrap Textbox Glow和Shadows

Fad*_*mal 87 html javascript css jquery twitter-bootstrap

我想删除文本框和边框的蓝色光晕,但我不知道如何覆盖它的任何js或css,请查看此处

编辑1

我想这样做,因为我使用的是jquery插件Tag-it,我也使用twitter bootstrap,插件使用隐藏的textField来添加标签,但是当我使用twitter bootstrap时,它显示为一个文本框,里面有一个发光文本框有点奇怪

小智 140

.simplebox {
  outline: none;
  border: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
  box-shadow: none !important;
}
Run Code Online (Sandbox Code Playgroud)


Haw*_*kee 26

您还可以覆盖默认的Bootstrap设置以使用您自己的颜色

textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus,
.uneditable-input:focus {
  border-color: rgba(82, 168, 236, 0.8);
  outline: 0;
  outline: thin dotted \9;
  /* IE6-9 */

  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
  -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
}
Run Code Online (Sandbox Code Playgroud)

  • 值得注意的是,这里不包含`<select>`选择器. (3认同)

Aus*_*eco 10

input.simplebox:focus {
  border: solid 1px #ccc;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  transition: none;
  -moz-transition: none;
  -webkit-transition: none;
}
Run Code Online (Sandbox Code Playgroud)

设置为bootstrap不专心的样式


Dim*_*alu 7

如果您认为无法处理css类,则只需在文本字段中添加样式即可

<input type="text" style="outline:none; box-shadow:none;">
Run Code Online (Sandbox Code Playgroud)


小智 7

在做了一些挖掘后,我认为他们在最新的bootstrap中改变了它.下面的代码对我有用,它不是简单的盒子,它我使用的形式控制导致了这个问题.

input.form-control,input.form-control:focus {
    border:none;
    box-shadow: none;
   -webkit-box-shadow: none;
   -moz-box-shadow: none;
   -moz-transition: none;
   -webkit-transition: none;
}
Run Code Online (Sandbox Code Playgroud)


小智 7

转到Customize Bootstrap,查找@ input-border-focus,输入所需的颜色代码,向下滚动并单击"编译和下载".


Gly*_*son 5

这将删除边框和焦点蓝色阴影.

input.simplebox,input.simplebox:focus {
  border:none;
  box-shadow: none;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  -moz-transition: none;
  -webkit-transition: none;
}
Run Code Online (Sandbox Code Playgroud)

http://jsfiddle.net/pE5mQ/64/