css - How to override focus background style for a div element in firefox? -
i have set tabindex of div element -1 allow focus. firefox highlights div element when gets focus gray background. how remove default behavior?
*:focus { -moz-appearance:none; outline: none; background-color: none; } has no effect.
the firefox version 38.3.
$( document ).ready(function(){ if(navigator.useragent.indexof('firefox') > -1){ $('.mydiv').css('background-color','yellow'); } }); .mydiv{ background-color : green; } <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> </script> <div class="mydiv"> <h1>change background color in mozila</h1> </div> 
Comments
Post a Comment