How come I can't remove the blue textarea border in Twitter Bootstrap?

后端 未结 18 1110
一向
一向 2020-12-07 11:02

In Chrome, there is a blue border around the textarea.

How come I can\'t remove it?

textarea:hover, input:hover, textarea:active, input:active, texta         


        
18条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 11:36

    Bootstrap 3

    If you just want to change the color, change the variable (recommended):

    Less or Customizer

    @input-border-focus: red;
    

    variables.less

    Sass

    $input-border-focus: red;
    

    variables.sass

    If you wan't to remove it completely, you'll have to overwrite the Mixin that sets the outline.

    .form-control-focus(@color: @input-border-focus) {}
    

    CSS

    If you are using css overwrite it via:

    .form-control:focus{
        border-color: #cccccc;
        -webkit-box-shadow: none;
        box-shadow: none;
    }
    

    Link to implementation

提交回复
热议问题