How to remove outline in bootstrap 4

前端 未结 7 766
误落风尘
误落风尘 2020-12-20 10:51

I want to remove textbox outline in bootstrap 4 but its not working. please let how can i remove this line.

CSS

         


        
7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-20 11:51

    The theme you're using sets box-shadow to inset 0 -2px 0 #2196F3 on focus.

    You need to override it, but not with none, because that would just remove it. You probably want it to remain at same value like when it's not focused. In short, you need this:

    textarea:focus, 
    textarea.form-control:focus, 
    input.form-control:focus, 
    input[type=text]:focus, 
    input[type=password]:focus, 
    input[type=email]:focus, 
    input[type=number]:focus, 
    [type=text].form-control:focus, 
    [type=password].form-control:focus, 
    [type=email].form-control:focus, 
    [type=tel].form-control:focus, 
    [contenteditable].form-control:focus {
      box-shadow: inset 0 -1px 0 #ffffd;
    }
    

    Also note you need to load this CSS after Bootstrap CSS and the theme you're loading.

提交回复
热议问题