Stopping IE from highlighting the first submit-button in a form

前端 未结 6 1858
庸人自扰
庸人自扰 2020-12-03 18:12

The expected behaviour on enter in a form seems to be undefined in the HTML 4.01 Specification while the HTML 5 specification says it should be the first submit button in th

6条回答
  •  星月不相逢
    2020-12-03 18:30

    Use either of these CSS Styles

    a:active, a:focus,input, input:active, input:focus{     outline: 0;     outline-style:none;     outline-width:0; }  
    a:active, a:focus,button::-moz-focus-inner, input[type="reset"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner, input[type="submit"]::-moz-focus-inner, input[type="file"] > input[type="button"]::-moz-focus-inner 
    {     border: none; } 
    

    OR

    :focus {outline:none;} ::-moz-focus-inner {border:0;}
    

    Once the CSS Style part is done, then you might also need to set the IE-Emulator. Update your web applications web.config file and include below key.

      
        
          
            
            
          
        
    
      
    

提交回复
热议问题