欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

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

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

先來(lái)一個(gè)簡(jiǎn)單的實(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>

效果圖:


來(lái)個(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>

效果圖:


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

相關(guān)文章

最新評(píng)論