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

后端 未结 18 1104
一向
一向 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:42

    This worked for me

    .form-control {
    box-shadow: none!important;}
    
    0 讨论(0)
  • 2020-12-07 11:42

    This works 100%.

    textarea:focus, input[type="text"]:focus,textarea[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, .form-control:focus {  
    border-color: (your color) or none;
    box-shadow:(your color) or none;
    outline: (your color) or none;}
    
    0 讨论(0)
  • 2020-12-07 11:43

    Solved using this. Works fine on bootstrap 3.x and 4.0

    * {
        outline:0px !important;
        -webkit-appearance:none;
    }
    

    With this code, you're going to remove outline from all tags and classes.

    0 讨论(0)
  • 2020-12-07 11:47

    You have write -webkit-appearance:none; like this:

    textarea:hover, 
    input:hover, 
    textarea:active, 
    input:active, 
    textarea:focus, 
    input:focus,
    button:focus,
    button:active,
    button:hover,
    label:focus,
    .btn:active,
    .btn.active
    {
        outline:0px !important;
        -webkit-appearance:none;
        box-shadow: none !important;
    }
    
    0 讨论(0)
  • 2020-12-07 11:49

    Bootstrap 4.0

    *:focus
    {
        box-shadow: none !important;
        border: solid 1px red( any color ) !important;
    }
    

    visual example

    0 讨论(0)
  • 2020-12-07 11:49

    This worked for me

    input[type=text]:focus{outline: none;}
    

    i'm using bootstrap 3

    0 讨论(0)
提交回复
热议问题