CSS remove default blue border

前端 未结 8 692
死守一世寂寞
死守一世寂寞 2020-12-29 03:47

I have a form with multiple buttons where I use a JavaScript to submit the second button when some one presses enter.

This works great but if I open this form in IE

相关标签:
8条回答
  • 2020-12-29 04:20
    #sideToggle:focus, #sideToggle:active{
      outline: 0;     
      outline-style:none;     
      outline-width:0;
    }
    

    This solved my problem if anyone else visits the post. I added my own styles separately, as they really aren't central to the issue.

    0 讨论(0)
  • 2020-12-29 04:23

    Simply add border-radius to develop the button look:

    -moz-border-radius:7px;
    -webkit-border-radius:7px;
    border-radius:7px;
    
    0 讨论(0)
  • 2020-12-29 04:29

    Think this should work (only tested IE10 on PC) for the border:

    button { outline: 0; }

    Want to remove the background (needed on WebKit/Blink)?

    Add:

    background: none;

    Need to get rid of the border (removes background on IE10 too):

    border: 0;

    0 讨论(0)
  • 2020-12-29 04:29

    This may help you. Use following CSS properties:

    input, 
    input:active, 
    input:focus {     
        outline: 0;     
        outline-style: none;     
        outline-width: 0; 
    }
    
    0 讨论(0)
  • 2020-12-29 04:30
    button{border:none; border-radius:4px; -moz-border-radius:4px;}
    
    0 讨论(0)
  • 2020-12-29 04:31

    Use this code:

    button { border:0;}
    
    0 讨论(0)
提交回复
热议问题