<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="textml; charset=utf-8" /> <title>無標(biāo)題文檔</title> <style type="text/css"> .box{ width:500px; height:300px; border:5px solid #00F;position:relative;} .left,.right{display:block;top:0;width:50px; height:300px;position:absolute; } .left span,.right span{position:relative;} .left{left:0;} .right{right:0;} .right{ float:right;} </style> <SCRIPT type=text/javascript src="http://d.lanrentuku.com/down/js/xiangce-848/js/jquery.js"></SCRIPT> <script type="text/javascript"> $(function(){ $(".left,.right").mouseover(function(){ $(this).html("<span><img src='images/leftbig.png'></span>") }).mouseout(function(){ $(this).html("") }) }) </script> </head> <body> <div> <div><img src="/uploads/201411/f94feeae3b52fd2bb9051d9e0bb70da21.jpg" width="500" height="300" /></div> <a href="#"></a> <a href="#"></a> </div> </body>
問題:鼠標(biāo)移運(yùn)到a標(biāo)簽,給a標(biāo)簽添加一個箭頭圖片。在谷歌下面是正常的,但是ie下面就沒反應(yīng)了,應(yīng)該如何來修改?
修改后的準(zhǔn)確代碼如下:
CCS code:
<style type="text/css"> .box{ width:500px; height:300px; border:5px solid #00F;position:relative;} .left,.right{display:block;top:0;width:50px; height:300px;position:absolute; z-index:99; background:url(一張透明圖片.png) repeat;} .left span,.right span,.img{position:relative;} .img{ z-index:10;} .left{left:0;} a.left:hover{background:url(/uploads/201411/f94feeae3b52fd2bb9051d9e0bb70da21.jpg) no-repeat center center;} .right{right:0; } a.right:hover{background:url(/uploads/201411/f94feeae3b52fd2bb9051d9e0bb70da21.jpg) no-repeat center center;} </style>
HTML code:
<div><img src="/uploads/201411/f94feeae3b52fd2bb9051d9e0bb70da21.jpg" width="500" height="300" /></div> <a href="#"></a> <a href="#"></a> </div>
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com