开发者

CSS Hover Background change not working on Safari

开发者 https://www.devze.com 2023-03-27 05:19 出处:网络
I have set up this code - and it\'s working fine on Firefox and IE - but it\'s not working at all in Safari - does anyone have any ideas why this isn\'t working?

I have set up this code - and it's working fine on Firefox and IE - but it's not working at all in Safari - does anyone have any ideas why this isn't working?

CSS

#list-menu { width: 235px; font-size: 1.3em; font-weight:bold; }
#list-menu ul { margin: 0; padding: 0; list-style-type: none; } 
#list-menu li { margin: 2px 0 0; } 
#list-menu a { display: block; width:235px; padding: 2px 2px 2px 10px; border: 1px solid #000000; background: #868686; text-decoration: none; } 
#list-menu a:link, #list-menu a:active, #list-menu a:visited { color: #ffffff; }
#list-menu a:hover { border: 1px solid #000000; background: #474747; color: #ffffff; } 

HTML

<div id="list-menu">
    <ul>
        <li><a href="#">Alexandra Burke</a></li>
        <li><a href="#">Avenge Sevenfold</a></li>
        <li><a href="#">Bullet For My Valentine</a></li>
        <li><a href="#">Chase & Status</a></li>
        <li><a href="#">Cliff Richard</a></li>
        <li><a href="#">Deconstruction</a></li>
        <li><a href="#">Jedward</a></li>
        <li><a href="#">JLS</a></li>
        <li><a href="#">Justin Bieber</a></li>
        <li><a href="#">Kasabian</a></li>
        <li><a href="#">Lady Gaga</a></li>
        <li><a href="#">Motorhead</a></li>
        <li><a href="#">N-Dubz</a></li>
        <li><a href="#">开发者_JAVA技巧Olly Murs</a></li>
        <li><a href="#">Pixie Lott</a></li>
        <li><a href="#">Queen</a></li>
        <li><a href="#">The Fuel Girls</a></li>
        <li><a href="#">The Saturdays</a></li>
        <li><a href="#">The Wanted</a></li>
    </ul> 
    </div> 


Not sure and not tested (as I don't have Safari), but perhaps Safari is choking on the rule declaration?

Try listing all the elements, something like

#list-menu ul li a:hover
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号