鼠标划过给div加透明度(兼容火狐和ie)

<script language="javascript">
<!-- Begin
if ((navigator.appName.indexOf('Microsoft')+1)) {
document.write('<style type="text/css"> #div2 a img{ filter:alpha(opacity=100)} #div2 a:hover img{ filter:alpha(opacity=70)} </style>');}
if ((navigator.appName.indexOf('Netscape')+1)) {
document.write('<style type="text/css"> #div2 a img{opacity: 1;} #div2 a:hover img{opacity: 0.7;}</style>'); }
else {
document.write(''); }
//  End -->
</script>

posted @ 2012-06-14 09:55  陌香  阅读(850)  评论(0编辑  收藏  举报