最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

CSS實(shí)現(xiàn)鼠標(biāo)懸浮出現(xiàn)遮罩層示例源碼

  發(fā)布時(shí)間:2016-09-05 18:01:14   作者:佚名   我要評(píng)論
這篇文章給大家分享了兩個(gè)鼠標(biāo)懸浮出現(xiàn)說明遮罩層的效果,大家可以根據(jù)自己的需要選擇某一種效果,兩種效果文中都給出了實(shí)例代碼,下面來一起看看吧。

先來一個(gè)簡單的實(shí)現(xiàn)方法:


復(fù)制代碼
代碼如下:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.mask-wrapper {
position: relative;
overflow: hidden;
}
.mask-inner {
position: absolute;
left: 0;
top: 100%;
width: 100%;
height: 100%;
-moz-transition: top ease 200ms;
-o-transition: top ease 200ms;
-webkit-transition: top ease 200ms;
transition: top ease 200ms;
}
.mask-wrapper:hover .mask-inner {
top: 0;
}
#my-mask {
width: 300px;
height: 200px;
background: red;
}
#my-mask .mask-inner {
background: rgba(0,0,0,.5);
}
</style>
</head>
<body>
<div id="my-mask" class="mask-wrapper">
<p>Lorem ipsum</p>
<div class="mask-inner">
<p>foo bar</p>
</div>
</div>
</body>
</html>

效果圖:


來個(gè)更高級(jí)點(diǎn)的:

復(fù)制代碼
代碼如下:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body {
font: 12px/1.5 arail;
}
ul {
list-style: none;
}
.icon-lists {
overflow: hidden;
background: #f7f7f7;
padding: 40px;
}
.icon-lists .box {
float: left;
margin-right: 10px;
}
.box {
position: relative;
width: 46px;
height: 46px;
overflow: hidden;
z-index: 1;
}
.box i, .box .info {
display: block;
width: 46px;
height: 46px;
border-radius: 46px;
}
.box .shadow {
position: absolute;
top: 0;
z-index: 10;
border-radius: 0;
background: url(<a >http://xiaomingming.qiniudn.com/shadow.png</a>) no-repeat;
}
.box .icon {
position: absolute;
top: 0;
line-height: 46px;
text-align: center;
background: #eee;
color: #333;
font-size: 14px;
}
.box .info {
position: absolute;
top: 46px;
z-index: 2;
background: orange;
color: #fff;
text-align: center;
line-height: 46px;
-webkit-transition:top .2s ease-in;
-moz-transition:top .2s ease-in;
transition:top .2s ease-in;
}
.box:hover>.info {
top:0;
}</p> <p> </style>
</head>
<body>
<ul class="icon-lists">
<li class="box">
<i class="shadow"></i>
<i class="icon">A</i>
<div class="info">服裝</div>
</li>
<li class="box">
<i class="shadow"></i>
<i class="icon">B</i>
<div class="info">鞋包</div>
</li>
<li class="box">
<i class="shadow"></i>
<i class="icon">C</i>
<div class="info">配飾</div>
</li>
<li class="box">
<i class="shadow"></i>
<i class="icon">D</i>
<div class="info">運(yùn)動(dòng)</div>
</li>
</ul>
</div>
</body>
</html>

效果圖:


以上就是這篇文章的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)和工作能帶來一定的幫助。

相關(guān)文章

最新評(píng)論

且末县| 溧水县| 通山县| 宁安市| 吴川市| 巴里| 城口县| 页游| 铜川市| 营口市| 尚志市| 资阳市| 甘肃省| 彩票| 双江| 中卫市| 定州市| 东丽区| 深州市| 嘉义县| 若尔盖县| 长治县| 探索| 玉溪市| 长顺县| 平邑县| 徐水县| 惠水县| 梧州市| 莱阳市| 遵化市| 绥阳县| 永济市| 叙永县| 明光市| 万山特区| 额济纳旗| 习水县| 合作市| 奉化市| 上栗县|