Box shadow not working in microsoft edge

匿名 (未验证) 提交于 2019-12-03 01:36:02

问题:

Box-shadow not working on Microsoft Edge browser. I have implemented the follow in the section: (I'm not an idiot I have at the top)

<meta http-equiv="X-UA-Compatible" content="IE=edge"> 

This is the body of my index.html file:

<body>     <div id="wrapper">         <header>             <div id="header-inner">                 <div id="logo">                     <a href="index.html">body</a>                 </div>             <ul>                 <li><a href="index.html">Home</a></li>                 <li><a id="sign-in" href="#">Sign in</a>                     <span id="sign-in-menu">                         <div class="arrow-up"></div>                         <div class="arrow-up-top"></div>                          <div class="form">                             <form action="login.php" method="get">                             <input type="text" placeholder="Username" name="inputUser">                             <input type="password" placeholder="Password"                             name="inputPass">                             <!-- <input type="checkbox" name="checkbox" id="checkbox" class="css-checkbox">                                 <label for="checkboxG1" class="css-label">Remember me</label> COOOKKiiieeesss -->                             </form>                         </div>                          <div class="submit-area">                             <input type="submit" value="Sign up">                         </div>                     </span>                 </li>                 <li><a href="register.html">Sign up</a></li>             </ul>         </div>     </header> </div> 

The hover CSS box shadow code:

header li > span input[type=submit]:hover {     -webkit-box-shadow: 0 0 0 1px #383e46;     -ms-box-shadow: 0 0 0 1px #383e46;     box-shadow: 0 0 0 1px #383e46; } 

回答1:

You Can Check Out This: Box Shadow For Edge

You need an extra element, but it's do-able with filter.

For Ie 8 and above (Egde version) You can Check this :box-shadow property



回答2:

Either change the css to:

header li > a > span input[type=submit]:hover {     -webkit-box-shadow: 0 0 0 1px #383e46;     -ms-box-shadow: 0 0 0 1px #383e46;     box-shadow: 0 0 0 1px #383e46; } 

or

header li span input[type=submit]:hover {     -webkit-box-shadow: 0 0 0 1px #383e46;     -ms-box-shadow: 0 0 0 1px #383e46;     box-shadow: 0 0 0 1px #383e46; } 

You have put an > between the li and span however the span never appears directly after the li within the code structure. Instead you either need to specify the a tag in your css like in my first example or remove the > to remove the specificity like in my second example.



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!