How can I get rid of input border in chrome?

后端 未结 5 1101
感情败类
感情败类 2021-01-04 07:22

In Chrome, my design has a light border or outline along the edges of the search input field. How can I get rid of this?

相关标签:
5条回答
  • 2021-01-04 07:32

    This snippet worked for me:

    input:focus {
        box-shadow: none;
    }
    
    0 讨论(0)
  • 2021-01-04 07:40

    Hey, it is easy to remove outline. Just set none to input field's outline property in css.

    For e.g.

    form input[type=text]:focus, form input[type=password]:focus, textarea:focus {
        outline: none;
    }
    

    Above will remove outline border in chrome and safari browsers on form element focus.

    0 讨论(0)
  • 2021-01-04 07:41
    input, select {
        outline: none;
    }
    

    This will disable the browser outline for all regular form elements.

    0 讨论(0)
  • 2021-01-04 07:48

    If you mean the blue "glow", add this CSS:

    outline: none;
    
    0 讨论(0)
  • 2021-01-04 07:49
    form#search input[type="search"] { 
        -webkit-appearance: none; 
    }
    

    Mind that this will disable the select element arrow.

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