删除Bootstrap 2中的Blue Glow

时间:2015-08-25 12:57:45

标签: twitter-bootstrap

当我在输入中有数据时,蓝灯将显示在输入的背景中,我想在bootstrap 2中删除它。

我只想在输入框中输入白色背景。

请记住,我使用的是bootstrap 2!

谢谢!

http://jsbin.com/vomukomune/edit?html,css,js,output

enter image description here

enter image description here

1 个答案:

答案 0 :(得分:1)

蓝色光晕是box-shadow,当它获得焦点时,Bootstrap CSS将其应用于<input>。您可以使用:focus伪类的自己的样式覆盖它,例如:

.text-input-wrapper input:focus {
  box-shadow: none;
}

updated the JSBin包括这种风格,所以你不应再看到蓝色的光芒。希望这可以帮助!如果您有任何问题,请告诉我。

编辑:以同样的方式,您在<input>中观察到的灰色内阴影也是box-shadow。因此,您可以通过将其添加到当前样式声明来解决它:

.text-input-wrapper input {
  box-shadow: none;
}

JSBin现已更新,以反映这一变化。

相关问题