css动画特效
<html>
<head>
<meta charset="utf-8" />
<title>6种css3鼠标滑过动画效果</title>
<style type="text/css"> /*****全局样式*****/
*{padding:0;margin:0;font-family:"微软雅黑"}
h2{margin:15px 0;font-weight: 300;}
.content{margin: 0 auto;max-width:728px;margin-top:20px;text-align:center}
footer{margin: 10px 0;font-size: 14px;}
hr{margin: 20px 0;}
code{font-size: 12px;} /*****鼠标悬停图片变大文字消失*****/
.style1 ul li{float:left;margin:0 6px;position:relative;list-style:none}
.style1 ul li{ -webkit-transition: all 0.5s; -moz-transition: all 0.5s; -o-transition: all 0.5s;}
.style1 ul li img{width: 170px;height: 120px;border-radius: 2px;}
.style1 ul li span{background:rgba(0, 0, 0, 0.5);color:#fff;border-bottom-left-radius: 2px;border-bottom-right-radius: 2px;line-height: 23px;position:absolute;bottom: 3px;width: 170px;left:0;font-size:12px;-webkit-transition: all 0.5s; -moz-transition: all 0.5s; -o-transition: all 0.5s; -ms-transition: all 0.5s;}
.style1 ul li:hover {-webkit-transform: scale(1.1); /*1.1放大值*/
-moz-transform: scale(1.1);
-o-transform: scale(1.1);
-ms-transform: scale(1.1);
/* 本hover用的是:transform属性;scale是属性下放大;*/ }
.style1 ul li:hover span{ opacity:0} /*****鼠标悬停文字消失*****/
.style2 ul li{float:left;margin:0 6px;position:relative;list-style:none}
.style2 ul li img{width: 170px;height: 120px;border-radius: 2px; -webkit-transition: all 0.5s; -moz-transition: all 0.5s; -o-transition: all 0.5s;}
.style2 ul li span{background:rgba(0, 0, 0, 0.5);color:#fff;border-bottom-left-radius: 2px;border-bottom-right-radius: 2px;line-height: 23px;position:absolute;bottom: 3px;width: 170px;left:0;font-size:12px;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-o-transition: all 0.5s;
-ms-transition: all 0.5s;
/*其意相同:transition:all;初始过度属性 值0;*/} .style2 ul li:hover span{ opacity:0}/*opacit:0;代表完全消失;0.5半透明*/ /*****鼠标悬停整体旋转*****/
.style3 ul li{float:left;margin:0 6px;position:relative;list-style:none}
.style3 ul li{ -webkit-transition: all 0.5s; -moz-transition: all 0.5s; -o-transition: all 0.5s;}
.style3 ul li img{width: 170px;height: 120px;border-radius: 2px;}
.style3 ul li span{background:rgba(0, 0, 0, 0.5);color:#fff;border-bottom-left-radius: 2px;border-bottom-right-radius: 2px;line-height: 23px;position:absolute;bottom: 3px;width: 170px;left:0;font-size:12px;transition:All 0.4s ease-in-out;-webkit-transition:All 0.4s ease-in-out;-moz-transition:All 0.4s ease-in-out;-o-transition:All 0.4s ease-in-out;}
.style3 ul li:hover { transform:rotate(360deg);
-webkit-transform:rotate(360deg);
-moz-transform:rotate(360deg);
-o-transform:rotate(360deg); /*css3旋转属性; 360deg(顺时针旋转360度)*/
-ms-transform:rotate(360deg);} /*****鼠标悬停整体旋转放大*****/
.style4 ul li{float:left;margin:0 6px;position:relative;list-style:none}
.style4 ul li{transition:All 0.4s ease-in-out; -webkit-transition:All 0.4s ease-in-out; -moz-transition:All 0.4s ease-in-out; -o-transition:All 0.4s ease-in-out;}
.style4 ul li img{width: 170px;height: 120px;border-radius: 2px;}
.style4 ul li span{background:rgba(0, 0, 0, 0.5);color:#fff;border-bottom-left-radius: 2px;border-bottom-right-radius: 2px;line-height: 23px;position:absolute;bottom: 3px;width: 170px;left:0;font-size:12px;transition:All 0.4s ease-in-out;-webkit-transition:All 0.4s ease-in-out;-moz-transition:All 0.4s ease-in-out;-o-transition:All 0.4s ease-in-out;}
.style4 ul li:hover {transform:rotate(360deg) scale(1.2);
-webkit-transform:rotate(360deg) scale(1.2);
-moz-transform:rotate(360deg) scale(1.2);
-o-transform:rotate(360deg) scale(1.2); /*transform 属性下 rotate(旋转)和scale(放大)属性;可以同时用*/
-ms-transform:rotate(360deg) scale(1.2);} /*****鼠标悬停整体上升*****/
.style5 ul li{float:left;margin:0 6px;position:relative;list-style:none}
.style5 ul li{transition:All 0.4s ease-in-out; -webkit-transition:All 0.4s ease-in-out; -moz-transition:All 0.4s ease-in-out; -o-transition:All 0.4s ease-in-out;}
.style5 ul li img{width: 170px;height: 120px;border-radius: 2px;}
.style5 ul li span{background:rgba(0, 0, 0, 0.5);color:#fff;border-bottom-left-radius: 2px;border-bottom-right-radius: 2px;line-height: 23px;position:absolute;bottom: 3px;width: 170px;left:0;font-size:12px;transition:All 0.4s ease-in-out;-webkit-transition:All 0.4s ease-in-out;-moz-transition:All 0.4s ease-in-out;-o-transition:All 0.4s ease-in-out;}
.style5 ul li:hover {transform:translate(0,-10px); -webkit-transform:translate(0,-10px); -moz-transform:translate(0,-10px); -o-transform:translate(0,-10px); -ms-transform:translate(0,-10px);} /*****鼠标悬停图片放大缩小动画*****/
@-webkit-keyframes play{
50% {
transform: scale(0.8);
} 100% {
transform: scale(1);
}
}
.style6 ul li{float:left;margin:0 6px;position:relative;list-style:none}
.style6 ul li{transition:All 0.4s ease-in-out; -webkit-transition:All 0.4s ease-in-out; -moz-transition:All 0.4s ease-in-out; -o-transition:All 0.4s ease-in-out;}
.style6 ul li img{width: 170px;height: 120px;border-radius: 2px;}
.style6 ul li span{background:rgba(0, 0, 0, 0.5);color:#fff;border-bottom-left-radius: 2px;border-bottom-right-radius: 2px;line-height: 23px;position:absolute;bottom: 3px;width: 170px;left:0;font-size:12px;transition:All 0.4s ease-in-out;-webkit-transition:All 0.4s ease-in-out;-moz-transition:All 0.4s ease-in-out;-o-transition:All 0.4s ease-in-out;}
.style6 ul li:first-child:hover{animation: play 0.3s 50 linear;}
.style6 ul li:last-child:hover{animation: play 0.3s 50 linear;position: relative;}
.style6 ul li:last-child h1{position: absolute;color: red;top: 50px;font-size: 40px;left: 96px;}
.style6 ul li:nth-child(2):hover {animation: play 0.3s 1 linear;}
.style6 ul li:nth-child(3):hover {animation: play 0.3s 2 linear;}
</style>
</head>
<body>
<body class="content"> <div class="style1 ">
<h2>1.鼠标悬停图片变大文字消失</h2>
<ul>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停图片变大文字消失</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停图片变大文字消失</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停图片变大文字消失</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停图片变大文字消失</span></li>
</ul>
</div>
<div style="clear:both"></div> <div class="style2">
<h2>2.鼠标悬停文字消失</h2>
<ul>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停文字消失</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停文字消失</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停文字消失</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停文字消失</span></li>
</ul>
</div>
<div style="clear:both"></div> <div class="style3">
<h2>3.鼠标悬停整体旋转</h2>
<ul>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停整体旋转</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停整体旋转</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停整体旋转</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停整体旋转</span></li>
</ul>
</div>
<div style="clear:both"></div> <div class="style4">
<h2>4.鼠标悬停整体旋转放大</h2>
<ul>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停整体旋转放大</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停整体旋转放大</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停整体旋转放大</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停整体旋转放大</span></li>
</ul>
</div>
<div style="clear:both"></div> <div class="style5">
<h2>5.鼠标悬停整体上升</h2>
<ul>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停整体上升</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停整体上升</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停整体上升</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停整体上升</span></li>
</ul>
</div>
<div style="clear:both"></div> <div class="style6">
<h2>6.鼠标悬停心脏咔咔跳</h2>
<ul>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停心脏咔咔跳</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停心脏咔咔跳</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停心脏咔咔跳</span></li>
<li><img src="http://img1.gtimg.com/autoxingtai/pics/hv1/25/31/204/13273030.jpg"><span>鼠标悬停心脏咔咔跳</span></li>
</ul>
</div>
<div style="clear:both"></div> <footer>
<code>
放大 修改scale(放大的值)<br />
旋转放大 修改rotate(旋转度数) scale(放大值)<br />
上下左右移动 修改translate(x轴,y轴)
</code>
<br />
<hr /> </footer>
</body>
</html>
2
<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>多款炫酷鼠标悬停图文动画效果</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body> <!-- 代码部分begin -->
<div class="lanren">
<div class="full-length">
<div class="container">
<!-- Effect-1 -->
<h2><span>Effects 1</span></h2>
<ul>
<li>
<div class="port-1 effect-1">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-1">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-1 effect-2">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-2">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-1 effect-3">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-3">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
</ul>
<!-- Effect-1 End --> <!-- Effect-2 -->
<h2><span>Effects 2</span></h2>
<ul>
<li>
<div class="port-2 effect-1">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-1">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-2 effect-2">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-2">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-2 effect-3">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-3">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
</ul>
<!-- Effect-2 End --> <!-- Effect-3 -->
<h2><span>Effects 3</span></h2>
<ul>
<li>
<div class="port-3 effect-1">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-1">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-3 effect-2">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-2">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-3 effect-3">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-3">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
</ul>
<!-- Effect-3 End --> <!-- Effect-4 -->
<h2><span>Effects 4</span></h2>
<ul>
<li>
<div class="port-4 effect-1">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-1">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-4 effect-2">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-2">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-4 effect-3">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-3">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
</ul>
<!-- Effect-4 End --> <!-- Effect-5 -->
<h2><span>Effects 5</span></h2>
<ul>
<li>
<div class="port-5 effect-1">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-1">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-5 effect-2">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-2">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-5 effect-3">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-3">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
</ul>
<!-- Effect-5 End --> <!-- Effect-6 -->
<h2><span>Effects 6</span></h2>
<ul>
<li>
<div class="port-6 effect-1">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-1">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-6 effect-2">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-2">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-6 effect-3">
<div class="image-box">
<img src="http://testlve.oss-cn-shenzhen.aliyuncs.com/1548752502061.png?Expires=1864112500&OSSAccessKeyId=LTAI6PiW8eCuyTZM&Signature=G%2B8h424EDa4DJ%2F4zlgots6jyXk4%3D" alt="Image-3">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
</ul>
<!-- Effect-6 End --> <!-- Effect-7 -->
<h2><span>Effects 7</span></h2>
<ul>
<li>
<div class="port-7 effect-1">
<div class="image-box">
<img src="data:images/img-1.jpg" alt="Image-1">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-7 effect-2">
<div class="image-box">
<img src="data:images/img-1.jpg" alt="Image-2">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-7 effect-3">
<div class="image-box">
<img src="data:images/img-1.jpg" alt="Image-3">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
</ul>
<!-- Effect-7 End --> <!-- Effect-8 -->
<h2><span>Effects 8</span></h2>
<ul>
<li>
<div class="port-8 effect-1">
<div class="image-box">
<img src="data:images/img-2.jpg" alt="Image-1">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-8 effect-2">
<div class="image-box">
<img src="data:images/img-2.jpg" alt="Image-2">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
<li>
<div class="port-8 effect-3">
<div class="image-box">
<img src="data:images/img-2.jpg" alt="Image-3">
</div>
<div class="text-desc">
<h3>Your Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.</p>
<a href="#" class="btn">Learn more</a>
</div>
</div>
</li>
</ul>
<!-- Effect-8 End -->
</div>
</div>
</div>
<!-- 代码部分end -->
</html>
<style>
/*= Reset CSS
============= */
html, body {border: 0; margin: 0; padding: 0;}
body { font: 14px "Lato", Arial, sans-serif; min-width: 100%; min-height: 100%; color: #666; background-color: #2D2D2D; }
.container{margin: 0 auto; max-width: 1060px;}
h2{color: #fff; float: left; width: 100%; font-size: 24px; font-weight: 400; text-align: center; padding: 50px 0 40px; position: relative; z-index: 50;}
h2 span{position: relative; padding-bottom: 10px;}
h2 span:after{content: ""; width: 50%; height: 3px; background-color: #fff; position: absolute; left: 25%; bottom: 0;}
*{margin: 0; padding: 0; box-sizing: border-box;}
img{max-width: 100%; vertical-align: middle;}
.full-length{width: 100%; float: left; padding-bottom: 80px;}
ul{margin: 0 -1.5%;}
li{float: left; width: 31.33%; margin: 10px 1%; list-style: none;} h3{font-size: 20px; margin: 5px 0 10px;}
p{font-weight: 300; line-height: 20px; font-size: 14px; margin-bottom: 15px;}
.btn{display: inline-block; padding: 5px 10px; font-size: 14px; color: #fff; border: 2px solid #4d92d9; background-color: #4d92d9; text-decoration: none; transition: 0.4s;}
.btn:hover{background-color: transparent; color: #4d92d9; transition: 0.4s;}
.text-desc{position: absolute; left: 0; top: 0; background-color: #fff; height: 100%; opacity: 0; width: 100%; padding: 20px;}
/*= Reset CSS End
================= * /* effect-1 css */
.port-1{float: left; width: 100%; position: relative; overflow: hidden; text-align: center; border: 4px solid rgba(255, 255, 255, 0.9);}
.port-1 .text-desc{opacity: 0.9; top: -100%; transition: 0.5s; color: #000; padding: 45px 20px 20px;}
.port-1 img{transition: 0.5s;}
.port-1:hover img{transform: scale(1.2);} .port-1.effect-1:hover .text-desc{top: 0;} .port-1.effect-2 .text-desc{top: auto; bottom: -100%;}
.port-1.effect-2:hover .text-desc{bottom: 0;} .port-1.effect-3 .text-desc{top: 50%; left: 50%; width: 0; height: 0; overflow: hidden; padding: 0;}
.port-1.effect-3:hover .text-desc{width: 100%; top: 0; left: 0; height: 100%; padding: 45px 20px 20px;}
/* effect-1 css end */ /* effect-2 css */
.port-2{float: left; width: 100%; position: relative; overflow: hidden; text-align: center; border: 4px solid rgba(255, 255, 255, 0.9); perspective: 800px;}
.port-2 .text-desc{z-index: -1; transition: 0.6s;}
.port-2 .image-box{transition: 0.4s;}
.port-2:hover .image-box{transform: rotateX(80deg); transform-origin: center bottom 0; transition: 0.4s;} .port-2.effect-1:hover .text-desc{opacity: 1;} .port-2.effect-2 .text-desc{opacity: 1; top: -100%;}
.port-2.effect-2:hover .text-desc{top: 0;} .port-2.effect-3 .text-desc{opacity: 1; top: auto; bottom: -100%;}
.port-2.effect-3:hover .text-desc{bottom: 0;}
/* effect-2 css end */ /* effect-3 css */
.port-3{float: left; width: 100%; position: relative; overflow: hidden; text-align: center; border: 4px solid rgba(255, 255, 255, 0.9); perspective: 500px;}
.port-3 img{transition: 0.5s;} .port-3.effect-1 .text-desc{z-index: -1; transition: 0.5s; transform: rotateX(80deg); transform-origin: center top 0; padding: 45px 20px 20px; opacity: 1;}
.port-3.effect-1:hover .text-desc{transform: none;}
.port-3.effect-1:hover img{opacity: 0; transform: scale(1.2)} .port-3.effect-2 .text-desc{z-index: -1; transition: 0.5s; transform: rotateX(80deg); transform-origin: center bottom 0; top: auto; bottom: 0; padding: 45px 20px 20px;}
.port-3.effect-2:hover .text-desc{transform: none; opacity: 1;}
.port-3.effect-2:hover img{transform: translateY(-100%)} .port-3.effect-3 .text-desc{z-index: -1; transition: 0.5s; transform: rotateX(80deg); transform-origin: center top 0; padding: 45px 20px 20px;}
.port-3.effect-3:hover .text-desc{transform: none; opacity: 1;}
.port-3.effect-3:hover img{transform: translateY(100%)}
/* effect-3 css end */ /* effect-4 css */
.port-4{float: left; width: 100%; position: relative; overflow: hidden; text-align: center; border: 4px solid rgba(255, 255, 255, 0.9); z-index: 10;} .port-4.effect-1 img{transition: 0.5s; transform: rotateY(360deg) scale(1, 1);}
.port-4.effect-1 .text-desc{transform: rotateY(0deg) scale(0, 0); transition: 0.5s; opacity: 0; padding: 45px 20px 20px;}
.port-4.effect-1:hover .text-desc{transform: rotateY(360deg) scale(1, 1); opacity: 1;}
.port-4.effect-1:hover img{transform: rotateY(0deg) scale(0, 0);} .port-4.effect-2{z-index: 12;}
.port-4.effect-2 img{transition: 0.5s; transform: rotateX(360deg) scale(1, 1);}
.port-4.effect-2 .text-desc{transform: rotateX(0deg) scale(0, 0); transition: 0.5s; opacity: 0; padding: 45px 20px 20px;}
.port-4.effect-2:hover .text-desc{transform: rotateX(360deg) scale(1, 1); opacity: 1;}
.port-4.effect-2:hover img{transform: rotateX(0deg) scale(0, 0);} .port-4.effect-3 img{transition: 0.5s; transform: rotate(360deg) scale(1, 1);}
.port-4.effect-3 .text-desc{transform: rotate(0deg) scale(0, 0); transition: 0.5s; opacity: 0; padding: 45px 20px 20px;}
.port-4.effect-3:hover .text-desc{transform: rotate(360deg) scale(1, 1); opacity: 1;}
.port-4.effect-3:hover img{transform: rotate(0deg) scale(0, 0);}
/* effect-4 css end */ /* effect-5 css */
.port-5{float: left; width: 100%; position: relative; overflow: hidden; text-align: center; border: 4px solid rgba(255, 255, 255, 0.9); overflow: visible;} .port-5.effect-1{z-index: 9;}
.port-5.effect-1 img{transition: 0.5s;}
.port-5.effect-1:hover img{transform: scale(0.5) translateX(-100%); position: relative; z-index: 9; border: 6px solid rgba(255, 255, 255, 0.9);}
.port-5.effect-1 .text-desc{transform: translateX(100%); opacity: 0; padding: 40px 20px 20px 90px; transition: 0.5s;}
.port-5.effect-1:hover .text-desc{transform: translateX(0px); opacity: 1;} .port-5.effect-2{z-index: 10;}
.port-5.effect-2 img{transition: 0.5s; transform: none);}
.port-5.effect-2:hover img{transform: scale(0.5) translateY(100%); position: relative; z-index: 9; border: 6px solid rgba(255, 255, 255, 0.9);}
.port-5.effect-2 .text-desc{transform: translateY(-100%); opacity: 0; padding: 20px; transition: 0.5s;}
.port-5.effect-2:hover .text-desc{transform: translateY(0px); opacity: 1;} .port-5.effect-3 img{transition: 0.5s;}
.port-5.effect-3:hover img{transform: scale(0.5) translateX(100%); position: relative; z-index: 9; border: 6px solid rgba(255, 255, 255, 0.9);}
.port-5.effect-3 .text-desc{transform: translateX(-100%); opacity: 0; padding: 40px 90px 20px 20px; transition: 0.5s;}
.port-5.effect-3:hover .text-desc{transform: translateX(0px); opacity: 1;}
/* effect-5 css end */ /* effect-6 css */
.port-6{float: left; width: 100%; position: relative; overflow: hidden; text-align: center; border: 4px solid rgba(255, 255, 255, 0.9); overflow: visible;} .port-6.effect-1{z-index: 8;}
.port-6.effect-1 img{transition: 0.5s;}
.port-6.effect-1:hover img{transform: scale(0.3) translateY(110%); position: relative; z-index: 9;}
.port-6.effect-1 .text-desc{transform: translateY(-100%); opacity: 0; padding: 10px 20px; transition: 0.5s;}
.port-6.effect-1:hover .text-desc{transform: translateY(0px); opacity: 1;} .port-6.effect-2{z-index: 7;}
.port-6.effect-2 img{transition: 0.6s; z-index: 1;}
.port-6.effect-2:hover img{transform: scale(0.3) translateX(110%); position: relative; z-index: 9;}
.port-6.effect-2 .text-desc{transform: translateX(-100%); opacity: 0; padding: 40px 120px 20px 20px; transition: 0.6s;}
.port-6.effect-2:hover .text-desc{transform: translateX(0px); opacity: 1;} .port-6.effect-3 img{transition: 0.5s;}
.port-6.effect-3:hover img{transform: scale(0.3) translateY(-110%); position: relative; z-index: 9;}
.port-6.effect-3 .text-desc{transform: translateY(100%); opacity: 0; padding: 85px 20px 10px; transition: 0.5s;}
.port-6.effect-3:hover .text-desc{transform: translateY(0px); opacity: 1;}
/* effect-6 css end */ /* effect-7 css */
.port-7{float: left; width: 100%; position: relative; overflow: hidden; text-align: center; border: 4px solid rgba(255, 255, 255, 0.9); overflow: hidden;}
.port-7 .text-desc{opacity: 0; transition: 0.5s; color: #000;} .port-7.effect-1 img{transition: 0.5s; position: relative; width: 100%; left: 0;}
.port-7.effect-1:hover img{left: 50%;}
.port-7.effect-1 .text-desc{transform: perspective(600px) rotateY(90deg); transform-origin: left center 0; width: 50%; position: absolute; left: 0; top: 0; padding: 18px 10px;}
.port-7.effect-1:hover .text-desc{opacity: 1; transform: perspective(600px) rotateY(0deg); z-index: 99;} .port-7.effect-2 img{transition: 0.5s; position: relative; width: 100%; top: 0;}
.port-7.effect-2:hover img{top: 50%;}
.port-7.effect-2 .text-desc{transform: perspective(600px) rotateX(90deg); transform-origin: top center 0; width: 100%; position: absolute; left: 0; top: 0; height: 50%; padding: 5px 10px;}
.port-7.effect-2:hover .text-desc{opacity: 1; transform: perspective(600px) rotateX(0deg); z-index: 99;} .port-7.effect-3 img{transition: 0.5s; position: relative; width: 100%; right: 0;}
.port-7.effect-3:hover img{right: 50%;}
.port-7.effect-3 .text-desc{transform: perspective(600px) rotateY(-90deg); transform-origin: right center 0; width: 50%; position: absolute; left: auto; right: 0; top: 0; padding: 18px 10px;}
.port-7.effect-3:hover .text-desc{opacity: 1; transform: perspective(600px) rotateY(0deg); z-index: 99;}
/* effect-7 css end */ /* effect-8 css */
.port-8{float: left; width: 100%; position: relative; overflow: hidden; text-align: center; border: 4px solid rgba(255, 255, 255, 0.9); overflow: hidden;}
.port-8 .text-desc{opacity: 0; transition: 0.5s; color: #000; padding: 45px 20px 20px;} .port-8.effect-1 img{transition: 0.5s;}
.port-8.effect-1:hover img{transform: scale(1.1);}
.port-8.effect-1 .text-desc{left: 0; position: absolute; top: 0; width: 100%; height: 100%; transform: scale(0); backface-visibility: hidden;}
.port-8.effect-1:hover .text-desc{opacity: 1; transform: scale(1); border-radius: 20%;} .port-8.effect-2 img{transition: 0.5s;}
.port-8.effect-2:hover img{transform: scale(1.1);}
.port-8.effect-2 .text-desc{left: 0; position: absolute; top: 0; width: 100%; height: 100%; transform: scale(0); backface-visibility: hidden;}
.port-8.effect-2:hover .text-desc{opacity: 1; transform: scale(1); border-radius: 50% 0 50% 0;} .port-8.effect-2 img{transition: 0.5s;}
.port-8.effect-2:hover img{transform: scale(1.1);}
.port-8.effect-2 .text-desc{left: 0; position: absolute; top: 0; width: 100%; height: 100%; transform: scale(0); backface-visibility: hidden;}
.port-8.effect-2:hover .text-desc{opacity: 1; transform: scale(1); border-radius: 50% 0 50% 0;} .port-8.effect-3 img{transition: 0.5s;}
.port-8.effect-3:hover img{transform: scale(1.1);}
.port-8.effect-3 .text-desc{left: 0; position: absolute; top: 0; width: 100%; height: 100%; transform: scale(0); backface-visibility: hidden; background: none; padding: 40px 70px 20px;}
.port-8.effect-3 .text-desc:before, .port-8.effect-3 .text-desc:after{background-color: #fff; border-radius: 50% 50% 0 0; content: ""; height: 100%; left: 50%; position: absolute; top: 0; transform: rotate(-50deg); transform-origin: 0 100% 0; width: 50%; z-index: -1;}
.port-8.effect-3 .text-desc:after {left: 0; transform: rotate(50deg); transform-origin: 100% 100% 0;}
.port-8.effect-3:hover .text-desc{opacity: 1; transform: scale(1);}
/* effect-8 css end */ /*= Media Screen CSS
==================== */
@media only screen and (max-width: 1090px){
ul{width: 340px; margin: 0 auto;}
li{width: 100%; margin: 20px 0;}
.port-5.effect-1 {z-index: 19;}
} @media only screen and (max-width: 360px){
ul{width: 300px;}
.port-1 .text-desc,
.port-1.effect-3:hover .text-desc,
.port-3.effect-1 .text-desc,
.port-3.effect-3 .text-desc,
.port-4.effect-1 .text-desc,
.port-4.effect-2 .text-desc,
.port-4.effect-3 .text-desc, .port-8 .text-desc{padding: 20px;}
.text-desc{padding: 7px;}
.port-5.effect-1 .text-desc{padding: 13px 20px 20px 90px;}
.port-5.effect-2 .text-desc{padding: 10px;}
.port-5.effect-3 .text-desc{padding: 16px 90px 20px 20px;}
.port-6.effect-1 .text-desc .btn,
.port-6.effect-2 .text-desc .btn,
.port-6.effect-3 .text-desc .btn,
.port-7.effect-1 .text-desc .btn,
.port-7.effect-2 .text-desc .btn,
.port-7.effect-3 .text-desc .btn,
.port-8.effect-3 .text-desc .btn{display: none;}
.port-6.effect-2 .text-desc{padding: 20px 120px 20px 20px;}
.port-6.effect-3 .text-desc{padding: 75px 20px 10px;}
.port-7.effect-1 .text-desc{padding: 12px 10px;}
.port-8.effect-3 .text-desc{padding: 28px 70px 20px;}
}
/*= Media Screen CSS End
======================== */
</style>
css动画特效的更多相关文章
- [CSS3] 学习笔记-CSS动画特效
在CSS3中,出现了很多出彩的效果,例如2D.3D以及过度.动画和多列等.这些效果为页面设计添加了很多的可选设计. 1.2D.3D转换 转换,是使元素改变尺寸.形状.位置的一种效果:通过CSS3转换, ...
- css动画特效与js动画特效(一)------2017-03-24
1.用css做动画效果: 放鼠标才会发生 利用hover <head> <style> #aa{ background-color: red; width: 100px; he ...
- CSS实现动画特效导航栏
0 写在前面 今天用纯CSS编写了一种带有特效的导航栏,一方面巩固熟悉了导航栏的一般写法,另一方面练习了CSS3的一些新特性. 1 实现效果 当鼠标划过时,实现了一种动态百叶窗效果. 2 实现细节 2 ...
- web前端学习(三)css学习笔记部分(5)-- CSS动画--页面特效、HTML与CSS3简单页面效果实例
CSS动画--页面特效部分内容目前仅仅观看了解内容,记录简单笔记,之后工作了进行内容的补充 7. CSS动画--页面特效 7.1 2D.3D转换 7.1.1 通过CSS3转换,我们能够对元素进行 ...
- CSS 脉冲和火箭动画特效
CSS脉冲和火箭动画特效 <!DOCTYPE html> <html lang="en"> <head> <meta charset=
- js,jquery,css,html5特效
包含js,jquery,css,html5特效,源代码 本文地址:http://www.cnblogs.com/roucheng/p/texiao.html 2017新年快乐特效 jQuery最新最全 ...
- 用CSS3动画特效实现弹窗效果
提示:如果大家觉得本篇实现的弹窗效果有用,可持续关注.接下会添加更多效果并且封装成插件,这样使用就方便了.效果查看: https://heavis.github.io/hidialog/index.h ...
- html5跟随鼠标炫酷网站引导页动画特效
html5跟随鼠标炫酷网站引导页动画特效一款非常不错的引导页,文字效果渐变,鼠标跟随出绚丽的条纹.html5炫酷网站引导页,鼠标跟随出特效. 体验效果:http://hovertree.com/tex ...
- jQuery css3鼠标悬停图片显示遮罩层动画特效
jQuery css3鼠标悬停图片显示遮罩层动画特效 效果体验:http://hovertree.com/texiao/jquery/39/ 效果图: 源码下载:http://hovertree.co ...
随机推荐
- Complete Binary Search Tree
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following propertie ...
- 知识点:Mysql 数据库索引优化实战(4)
知识点:Mysql 索引原理完全手册(1) 知识点:Mysql 索引原理完全手册(2) 知识点:Mysql 索引优化实战(3) 知识点:Mysql 数据库索引优化实战(4) 一:插入订单 业务逻辑:插 ...
- AX2012 ERP Excel报表方案
AX提供了丰富的报表方式,内置X++开发的报表.基于微软ReportingService的报表.每个界面都可以导出Excel.Management Reporter.实施ERP最主要的二开工作就是完成 ...
- 性能测试过程中oracle数据库报ORA-27301 ORA-27302错
最近在性能测试过程中发现,发现虚拟用户数上不去,加载到一定的数量应用端就报错,提示连接数据库出错.在测试的过程中查看web容器的线程池 数据源的连接池 都还有空闲,同时查看oracle的v$sessi ...
- oracle表的基本操作
--修改名称rename l_user_info to t_user_info --添加带有约束的表 create table t_user_menu( id number(20) primary k ...
- 关于js-xlsx的简单使用
关于js-xlsx的简单使用 最近要做一个东西用到对excel的操作,就是在前端将excel加载进来,操作后再生成excel,在网上找了很多种办法,能够实现的demo是下面这个: 纯前端利用 js-x ...
- django框架使用mysql报错,及两种解决方法
1.django框架 settings.py文件中部分代码: DATABASES = { # 'default': { # 'ENGINE': 'django.db.backends.sqlite3' ...
- [论文阅读]MobileNetV2: Inverted Residuals and Linear Bottlenecks
0. 本文贡献点 本文的主要贡献点是一个构造了一个结构,称为the inverted residual with linear bottleneck.该结构与传统的residual bloc ...
- bootstrapvalidator的简单校验【必填校验、长度校验、是否存在校验(remote)】
需求:输入框的"供应商编码"不能为空而且不能与数据库重复,供应商名称不能为空. 解决: 1.input如下 <input id="ssupplierNo" ...
- gentoo qt-creator no examples
参考 [SOLVED] qtcreator: examples are missing https://forums.gentoo.org/viewtopic-t-1092826-highlight- ...