鼠標(biāo)經(jīng)過(guò)出現(xiàn)氣泡框的簡(jiǎn)單實(shí)例
今天看到一個(gè)css效果不錯(cuò),轉(zhuǎn)一下
1. html
<!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="text/html; charset=UTF-8" /> <title>Animated Menu Hover 1</title> <script type="text/javascript" src="http://www.webdesignerwall.com/demo/jquery/jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".menu li").hover(function() { $(this).find("em").animate({opacity: "show", top: "-75"}, "slow"); }, function() { $(this).find("em").animate({opacity: "hide", top: "-85"}, "fast"); }); }); </script> <style type="text/css"> body { margin: 10px auto; width: 570px; font: 75%/120% Arial, Helvetica, sans-serif; } .menu { margin: 100px 0 0; padding: 0; list-style: none; } .menu li { padding: 0; margin: 0 2px; float: left; position: relative; text-align: center; } .menu a { padding: 14px 10px; display: block; color: #000000; width: 144px; text-decoration: none; font-weight: bold; background: url('//img.jbzj.com/file_images/article/201703/button.gif') no-repeat center center; } .menu li em { background: url('//img.jbzj.com/file_images/article/201703/hover.jpg') no-repeat; width: 180px; height: 45px; position: absolute; top: -85px; left: -15px; text-align: center; padding: 20px 12px 10px; font-style: normal; z-index: 2; display: none; } </style> </head> <body> <ul class="menu"> <li> <a href=http://www.dbjr.com.cn rel="external nofollow" >Web Designer Wall</a> <em>A wall of design ideas, web trends, and tutorials</em> </li> <li> <a href="http://www.dbjr.com.cn" rel="external nofollow" >Best Web Gallery</a> <em>Featuring the best CSS and Flash web sites</em> </li> <li> <a href="http://www.dbjr.com.cn" rel="external nofollow" >N.Design Studio</a> <em>Blog and design portfolio of WDW designer, Nick La</em> </li> </ul> </body> </html>
2. js
<script type="text/javascript"> $(document).ready(function(){ $(".menu li").hover(function() { $(this).find("em").animate({opacity: "show", top: "-75"}, "slow"); }, function() { $(this).find("em").animate({opacity: "hide", top: "-85"}, "fast"); }); }); </script>
3. 效果圖
以上這篇鼠標(biāo)經(jīng)過(guò)出現(xiàn)氣泡框的簡(jiǎn)單實(shí)例就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
相關(guān)文章
jQuery插件Slider Revolution實(shí)現(xiàn)響應(yīng)動(dòng)畫(huà)滑動(dòng)圖片切換效果
Slider Revolution插件是一款非常強(qiáng)大的插件了,我們可以利用它來(lái)制作出各種效果并且還支持移動(dòng)設(shè)備,支持手機(jī)觸摸,鍵盤(pán)翻頁(yè);它內(nèi)置幻燈、視頻播放計(jì)時(shí)器等等效果,具體我們來(lái)看看。2015-06-06jQuery中JSONP的兩種實(shí)現(xiàn)方式詳解
這篇文章主要介紹了jQuery中JSONP的兩種實(shí)現(xiàn)方式詳解的相關(guān)資料,需要的朋友可以參考下2016-09-09jQuery form 表單驗(yàn)證插件(fieldValue)校驗(yàn)表單
這篇文章主要介紹了jQuery form 表單驗(yàn)證插件(fieldValue)校驗(yàn)表單的相關(guān)資料,需要的朋友可以參考下2016-01-01jQuery使用動(dòng)態(tài)渲染表單功能完成ajax文件下載
使用ajax實(shí)現(xiàn)文件下載,方便,快捷,時(shí)尚,多么有挑戰(zhàn)的一個(gè)功能,首先獲取url和data然后把參數(shù)組裝成form的input再利用request發(fā)送請(qǐng)求,也就是動(dòng)態(tài)渲染表單,提交表單后再刪除,本例將實(shí)現(xiàn)文件下載功能,感興趣的朋友可以聊解下2013-01-01jQuery右鍵菜單contextMenu使用實(shí)例
在最近項(xiàng)目中需要頻繁的右鍵菜單操作。我采用了contextMenu這款jQuery插件。2011-09-09打造基于jQuery的高性能TreeView(asp.net)
項(xiàng)目中經(jīng)常會(huì)遇到樹(shù)形數(shù)據(jù)的展現(xiàn),包括導(dǎo)航,選擇等功能,所以樹(shù)控件在大多項(xiàng)目中都是必須的。那一個(gè)實(shí)用的樹(shù)應(yīng)該具備什么功能呢?2011-02-02使用jquery的ajax需要注意的地方dataType的設(shè)置
沒(méi)有設(shè)置dataType:'json',就出現(xiàn)無(wú)法解析返回的data數(shù)據(jù),會(huì)把data當(dāng)作字符串處理,而不是json對(duì)象,記得以前是不用設(shè)dataType的,很奇怪,不知道是不是跟jquery版本有關(guān)系2013-08-08使用jQuery簡(jiǎn)化Ajax開(kāi)發(fā) Ajax開(kāi)發(fā)入門(mén)
jQuery是一個(gè)可以簡(jiǎn)化 JavaScript™以及AJAX(Asynchronous JavaScript + XML,異步Javascript和XML)編程的Javascript庫(kù)。不同于其他的Javascript庫(kù),jQuery有他自己的哲學(xué),使你可以 很簡(jiǎn)單的編寫(xiě)代碼。2009-10-10