鼠標(biāo)經(jīng)過出現(xià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.dhdzp.com rel="external nofollow" >Web Designer Wall</a>
<em>A wall of design ideas, web trends, and tutorials</em>
</li>
<li>
<a href="http://www.dhdzp.com" rel="external nofollow" >Best Web Gallery</a>
<em>Featuring the best CSS and Flash web sites</em>
</li>
<li>
<a href="http://www.dhdzp.com" 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)過出現(xiàn)氣泡框的簡單實(shí)例就是小編分享給大家的全部內(nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
相關(guān)文章
jQuery實(shí)現(xiàn)點(diǎn)擊DIV同時(shí)點(diǎn)擊CheckBox,并為DIV上背景色的實(shí)例
下面小編就為大家分享一篇jQuery實(shí)現(xiàn)點(diǎn)擊DIV同時(shí)點(diǎn)擊CheckBox,并為DIV上背景色的實(shí)例,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧2017-12-12
jQuery學(xué)習(xí)筆記之 Ajax操作篇(一) - 數(shù)據(jù)加載
Ajax 通俗來講即不需要刷新頁面即可從服務(wù)器或客戶端上加載數(shù)據(jù),當(dāng)然這些數(shù)據(jù)的格式是多種多樣的。2014-06-06
基于jquery實(shí)現(xiàn)點(diǎn)擊左右按鈕圖片橫向滾動(dòng)
點(diǎn)擊左右按鈕圖片橫向滾動(dòng)jquery,一次滾動(dòng)四個(gè),圖片滾動(dòng)完成,自動(dòng)回到第一個(gè)版面,效果相當(dāng)不錯(cuò),感興趣的前端工程師們可以參考下2013-04-04
jQuery遍歷頁面所有CheckBox查看是否被選中的方法
這篇文章主要介紹了jQuery遍歷頁面所有CheckBox查看是否被選中的方法,涉及jQuery鏈?zhǔn)讲僮骷搬槍heckBox的操作技巧,非常具有實(shí)用價(jià)值,需要的朋友可以參考下2015-04-04
基于jquery的點(diǎn)擊鏈接插入鏈接內(nèi)容的代碼
基于jquery的點(diǎn)擊鏈接插入鏈接內(nèi)容的代碼,感覺有bug,解決的朋友可以留言方便更多的朋友2012-07-07
jQuery leonaScroll 1.1 自定義滾動(dòng)條插件(推薦)
這篇文章主要介紹了jQuery leonaScroll 1.1 自定義滾動(dòng)條插件(推薦)的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2016-09-09
Jquery通過Ajax方式來提交Form表單的具體實(shí)現(xiàn)
提交Form表單的方法有很多,在本文為大家介紹下Jquery通過Ajax方式是如何提交Form表單的2013-11-11

