Change Bootstrap input focus blue glow

后端 未结 19 2114
抹茶落季
抹茶落季 2020-11-30 16:53

Does anyone know the how to change Bootstrap\'s input:focus? The blue glow that shows up when you click on an input field?

19条回答
  •  [愿得一人]
    2020-11-30 17:27

    Add an Id to the body tag. In your own Css (not the bootstrap.css) point to the new body ID and set the class or tag you want to override and the new properties. Now you can update bootstrap anytime without loosing your changes.

    html file:

      
    

    css file:

    #bootstrap-overrides input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="url"]:focus, textarea:focus{
      border-color: red;
      box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(126, 239, 104, 0.6);
      outline: 0 none;
    }
    

    See also: best way to override bootstrap css

提交回复
热议问题