鼠標(biāo)經(jīng)過出現(xiàn)氣泡框的簡單實例
更新時間:2017年03月17日 09:29:14 投稿:jingxian
下面小編就為大家?guī)硪黄髽?biāo)經(jīng)過出現(xiàn)氣泡框的簡單實例。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
今天看到一個css效果不錯,轉(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.fzitv.net rel="external nofollow" >Web Designer Wall</a>
<em>A wall of design ideas, web trends, and tutorials</em>
</li>
<li>
<a href="http://www.fzitv.net" rel="external nofollow" >Best Web Gallery</a>
<em>Featuring the best CSS and Flash web sites</em>
</li>
<li>
<a href="http://www.fzitv.net" 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)氣泡框的簡單實例就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持腳本之家。
您可能感興趣的文章:
相關(guān)文章
jQuery實現(xiàn)點擊DIV同時點擊CheckBox,并為DIV上背景色的實例
下面小編就為大家分享一篇jQuery實現(xiàn)點擊DIV同時點擊CheckBox,并為DIV上背景色的實例,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2017-12-12
jQuery學(xué)習(xí)筆記之 Ajax操作篇(一) - 數(shù)據(jù)加載
Ajax 通俗來講即不需要刷新頁面即可從服務(wù)器或客戶端上加載數(shù)據(jù),當(dāng)然這些數(shù)據(jù)的格式是多種多樣的。2014-06-06
jQuery遍歷頁面所有CheckBox查看是否被選中的方法
這篇文章主要介紹了jQuery遍歷頁面所有CheckBox查看是否被選中的方法,涉及jQuery鏈?zhǔn)讲僮骷搬槍heckBox的操作技巧,非常具有實用價值,需要的朋友可以參考下2015-04-04
jQuery leonaScroll 1.1 自定義滾動條插件(推薦)
這篇文章主要介紹了jQuery leonaScroll 1.1 自定義滾動條插件(推薦)的相關(guān)資料,非常不錯,具有參考借鑒價值,需要的朋友可以參考下2016-09-09
Jquery通過Ajax方式來提交Form表單的具體實現(xiàn)
提交Form表單的方法有很多,在本文為大家介紹下Jquery通過Ajax方式是如何提交Form表單的2013-11-11

