當前位置:編程學習大全網 - 網站源碼 - 用js如何做“把鼠標置於頭像上就顯示出 資料卡 註銷 的文字鏈接”?文字鏈接要置於圖片下方。不用jq。

用js如何做“把鼠標置於頭像上就顯示出 資料卡 註銷 的文字鏈接”?文字鏈接要置於圖片下方。不用jq。

妳在圖片上靠下位置寫壹個div id="123",Z-INDEX=100,大壹點(目的是div位於圖片上面的層),大概如下:

<img src="xxxx.jpg"/>

<div id="123" style=" width:100;height:20;position:absolute;top:40;left:0;Z-INDEX:100;display:none"><a href='xxx.html'>更換頭像</a></div>

<script>

document.getElementById("123").onmouseover=function(){

this.style.display="";

}

document.getElementById("123").onmouseout=function(){

this.style.display="none";

}

</script>

}

沒測試,僅供參考

  • 上一篇:哪個星座最摳門?
  • 下一篇:求asp網頁代碼點擊 文字後 自動復制到剪切板
  • copyright 2024編程學習大全網