課程
/前端開(kāi)發(fā)
/JavaScript
/圖片展示特效
這個(gè)效果怎么用css來(lái)寫(xiě)?。?/p>
2015-08-20
源自:圖片展示特效 2-2
正在回答
用 :hover ?a { top:0;}就可以了。
例如:
<!DOCTYPE?HTML> <html> <head> ????<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/> ????<title></title> ????<link?rel="stylesheet"?href="style.css"??/> ????<style?type="text/css"> ????????.time?{ ????????????position:?relative; ????????????height:?400px; ????????????width:?400px; ????????????background:?#ff6600; ????????????overflow:?hidden; ????????} ????????.time-a?{ ????????????position:?absolute; ????????????top:?300px; ????????????display:?inline-block; ????????????height:?400px; ????????????width:?400px; ????????????background:?#000; ????????????opacity:?0.8; ????????????text-align:?center; ????????} ????????.time:hover?.time-a?{ ????????????top:0; ????????} ????</style> </head> <body> <div?class="content3"> ????<div?class="time"> ????????<a?href=""?class="time-a">321654987</a> ????</div> </div> </body> </html>
舉報(bào)
使用JS技術(shù)實(shí)現(xiàn)圖片展示效果效果,讓網(wǎng)頁(yè)增彩是否心動(dòng),快快加入我們
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2015-11-18
用 :hover ?a { top:0;}就可以了。
例如: