誰可以告訴我怎么做出這種效果啊?!
我記得我們老師講過最簡單的就是溢出隱藏。。。然后用a:hover設(shè)置鼠標(biāo)指上去顯示。
<div id="test">offset</div><div id="title">Hello World.</div>
$(function() {$("#test").bind({"mouseenter": function(e) { $("#title").css("left",e.pageX).css("top",e.pageY).show();},"mouseout": function(e) { $("#title").hide();}});});
#title { width:100px; height:100px; display:none; position:absolute; background-color:red; }#test { position:absolute; text-align:center; left:20%; top:20%; right:50%; bottom:50%; background-color:gray; border: 1px solid ;}
JavaScript?????????????????????????
display:none隱藏,想顯示的時候,加個偽類:hover,然后display:block;就出來了,我覺得這是最簡單的方法,但是位置要加對,定位也要準(zhǔn),不然不會出來的。
???
HTML怎么學(xué)習(xí)?HTML怎么入門?HTML在哪學(xué)?HTML怎么學(xué)才快?不用擔(dān)心,這里為大家提供了HTML速學(xué)教程(入門課程),有需要的小伙伴保存下載就能學(xué)習(xí)啦!
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://www.miracleart.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號