我嘗試執行以下代碼以顯示鏈接懸停時的透明度框。懸停項目時IE 8中的不透明度
<script type="text/javascript">
$(document).ready(function(){
$(".menu a").hover(function() {
$(this).next("em").animate({filter:"alpha(opacity=40)", top: "75"}, "slow");
}, function() {
$(this).next("em").animate({opacity: "hide", top: "85"}, "fast");
});
});
</script>
<style>
.menu li em {
background: #000;
width: 180px;
height: 45px;
position: absolute;
top: 85px;
left: -15px;
text-align: center;
padding: 20px 12px 10px;
font-style: normal;
z-index: 2;
color:fff;
display:none;
}
</style>
<body>
<ul class="menu">
<li>
<a href="http://www.example.com">This is an example</a>
<em>Welcome to this example tutorial</em>
</li>
</ul>
</body>
當我懸停鏈接,透明不工作,什麼正確的透明代碼我需要放在那裏我的意思是在JavaScript函數內。非常感謝
任何人請幫助我,謝謝 – smith