8款CSS3鼠标滑过图片动画特效代码

maolai web前端评论505阅读模式

  纯CSS3鼠标滑过图片文字动画特效,8款CSS3鼠标滑过图片动画效果,包括鼠标移动到图片时显示文字,图片与文字同时翻转显示,文字放大图片缩小,一半文字一半图片旋转显示等css+html自适应动画特效。

  css3图片显示,css3动画,css3鼠标经过显示文字图片,纯css3文字特效素材。picture-text

8款CSS3鼠标滑过图片动画特效代码
一、html代码

<!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>8款CSS3鼠标滑过图片动画效果 - bokequ.com</title>
<link rel="stylesheet" type="text/css" href="css/hover-effects.css">
</head>
<body>
<div class="full-length">
	<div class="container">
		<!-- Effect-1 -->
		<h2><span>效果 1</span></h2>
		<ul>
			<li>
				<div class="port-1 effect-1">
					<div class="image-box">
						<img src="images/img-1.jpg" alt="Image-1">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-1 effect-2">
					<div class="image-box">
						<img src="images/img-1.jpg" alt="Image-2">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-1 effect-3">
					<div class="image-box">
						<img src="images/img-1.jpg" alt="Image-3">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
		</ul>
		<!-- Effect-1 End -->
		
		<!-- Effect-2 -->
		<h2><span>效果 2</span></h2>
		<ul>
			<li>
				<div class="port-2 effect-1">
					<div class="image-box">
						<img src="images/img-2.jpg" alt="Image-1">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-2 effect-2">
					<div class="image-box">
						<img src="images/img-2.jpg" alt="Image-2">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-2 effect-3">
					<div class="image-box">
						<img src="images/img-2.jpg" alt="Image-3">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
		</ul>
		<!-- Effect-2 End -->
		
		<!-- Effect-3 -->
		<h2><span>效果 3</span></h2>
		<ul>
			<li>
				<div class="port-3 effect-1">
					<div class="image-box">
						<img src="images/img-3.jpg" alt="Image-1">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-3 effect-2">
					<div class="image-box">
						<img src="images/img-3.jpg" alt="Image-2">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-3 effect-3">
					<div class="image-box">
						<img src="images/img-3.jpg" alt="Image-3">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
		</ul>
		<!-- Effect-3 End -->
		
		<!-- Effect-4 -->
		<h2><span>效果 4</span></h2>
		<ul>
			<li>
				<div class="port-4 effect-1">
					<div class="image-box">
						<img src="images/img-4.jpg" alt="Image-1">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-4 effect-2">
					<div class="image-box">
						<img src="images/img-4.jpg" alt="Image-2">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-4 effect-3">
					<div class="image-box">
						<img src="images/img-4.jpg" alt="Image-3">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
		</ul>
		<!-- Effect-4 End -->
		
		<!-- Effect-5 -->
		<h2><span>效果 5</span></h2>
		<ul>
			<li>
				<div class="port-5 effect-1">
					<div class="image-box">
						<img src="images/img-5.jpg" alt="Image-1">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-5 effect-2">
					<div class="image-box">
						<img src="images/img-5.jpg" alt="Image-2">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-5 effect-3">
					<div class="image-box">
						<img src="images/img-5.jpg" alt="Image-3">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
		</ul>
		<!-- Effect-5 End -->
		
		<!-- Effect-6 -->
		<h2><span>效果 6</span></h2>
		<ul>
			<li>
				<div class="port-6 effect-1">
					<div class="image-box">
						<img src="images/img-6.jpg" alt="Image-1">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-6 effect-2">
					<div class="image-box">
						<img src="images/img-6.jpg" alt="Image-2">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-6 effect-3">
					<div class="image-box">
						<img src="images/img-6.jpg" alt="Image-3">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
		</ul>
		<!-- Effect-6 End -->
		
		<!-- Effect-7 -->
		<h2><span>效果 7</span></h2>
		<ul>
			<li>
				<div class="port-7 effect-1">
					<div class="image-box">
						<img src="images/img-1.jpg" alt="Image-1">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-7 effect-2">
					<div class="image-box">
						<img src="images/img-1.jpg" alt="Image-2">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>忙碌的时候感觉特别好,觉得没辜负早上化的妆,中午吃的两碗饭,晚上牺牲的睡眠,所以人一定要前进。</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-7 effect-3">
					<div class="image-box">
						<img src="images/img-1.jpg" alt="Image-3">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
		</ul>
		<!-- Effect-7 End -->
		
		<!-- Effect-8 -->
		<h2><span>效果 8</span></h2>
		<ul>
			<li>
				<div class="port-8 effect-1">
					<div class="image-box">
						<img src="images/img-2.jpg" alt="Image-1">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-8 effect-2">
					<div class="image-box">
						<img src="images/img-2.jpg" alt="Image-2">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>人生就像一辆列车,进了站有人会上车,有人就必须要下车,相伴过一段旅程,该放手时就要放手,这才是对彼此最好的结束。.</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
			<li>
				<div class="port-8 effect-3">
					<div class="image-box">
						<img src="images/img-2.jpg" alt="Image-3">
					</div>
					<div class="text-desc">
						<h3>心情说说</h3>
						<p>忙碌的时候感觉特别好,觉得没辜负早上化的妆,中午吃的两碗饭,晚上牺牲的睡眠,所以人一定要前进。</p>
						<a href="#" class="btn">阅读更多信息</a>
					</div>
				</div>
			</li>
		</ul>
		<!-- Effect-8 End -->
	</div>
</div>
</body>
</html>

二、css样式


/*= 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: url(http://www.bokequ.com/blog/12/images/bg1.jpg) repeat;}
.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%; color: #000; padding: 45px 20px 20px;
	
	transition: 0.5s;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
}
.port-1 img{
	transition: 0.5s;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
}
.port-1:hover img{
	transform: scale(1.2);
	-webkit-transform: scale(1.2);
	-moz-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;
	-webkit-transition: 0.6s;
	-moz-transition: 0.6s;
}
.port-2 .image-box{
	transition: 0.4s;
	-webkit-transition: 0.4s;
	-moz-transition: 0.4s;
}
.port-2:hover .image-box{
	transform: rotateX(80deg); 
	-webkit-transform: rotateX(80deg); 
	-moz-transform: rotateX(80deg); 
	
	transform-origin: center bottom 0; 
	-webkit-transform-origin: center bottom 0; 
	-moz-transform-origin: center bottom 0; 
	
	transition: 0.4s;
	-webkit-transition: 0.4s;
	-moz-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;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
}

.port-3.effect-1 .text-desc{
	z-index: -1; padding: 45px 20px 20px; opacity: 1;
	
	transition: 0.5s; 
	-webkit-transition: 0.5s; 
	-moz-transition: 0.5s; 
	
	transform: rotateX(80deg); 
	-webkit-transform: rotateX(80deg); 
	-moz-transform: rotateX(80deg); 
	
	transform-origin: center top 0; 
	-webkit-transform-origin: center top 0; 
	-moz-transform-origin: center top 0; 
}
.port-3.effect-1:hover .text-desc{
	transform: none;
	-webkit-transform: none;
	-moz-transform: none;
}
.port-3.effect-1:hover img{
	opacity: 0;
	
	transform: scale(1.2);
	-webkit-transform: scale(1.2);
	-moz-transform: scale(1.2);
}

.port-3.effect-2 .text-desc{
	z-index: -1; top: auto;bottom: 0;padding: 45px 20px 20px;
	
	transition: 0.5s; 
	-webkit-transition: 0.5s; 
	-moz-transition: 0.5s; 
	
	transform: rotateX(80deg); 
	-webkit-transform: rotateX(80deg); 
	-moz-transform: rotateX(80deg); 
	
	transform-origin: center bottom 0;
	-webkit-transform-origin: center bottom 0;
	-moz-transform-origin: center bottom 0;
}
.port-3.effect-2:hover .text-desc{
	opacity: 1;
	transform: none;
	-webkit-transform: none;
	-moz-transform: none;
}
.port-3.effect-2:hover img{
	transform: translateY(-100%);
	-webkit-transform: translateY(-100%);
	-moz-transform: translateY(-100%);
}

.port-3.effect-3 .text-desc{
	z-index: -1; padding: 45px 20px 20px;
	
	transition: 0.5s; 
	-webkit-transition: 0.5s; 
	-moz-transition: 0.5s; 
	
	transform: rotateX(80deg); 
	-webkit-transform: rotateX(80deg); 
	-moz-transform: rotateX(80deg); 
	
	transform-origin: center top 0;
	-webkit-transform-origin: center top 0;
	-moz-transform-origin: center top 0;
}
.port-3.effect-3:hover .text-desc{
	opacity: 1;
	
	transform: none;
	-webkit-transform: none;
	-moz-transform: none;
}
.port-3.effect-3:hover img{
	transform: translateY(100%);
	-webkit-transform: translateY(100%);
	-moz-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; 
	-webkit-transition: 0.5s; 
	-moz-transition: 0.5s; 
	
	transform: rotateY(360deg) scale(1, 1);
	-webkit-transform: rotateY(360deg) scale(1, 1);
	-moz-transform: rotateY(360deg) scale(1, 1);
}
.port-4.effect-1 .text-desc{
	opacity: 0; padding: 45px 20px 20px;
	
	transform: rotateY(0deg) scale(0, 0); 
	-webkit-transform: rotateY(0deg) scale(0, 0); 
	-moz-transform: rotateY(0deg) scale(0, 0); 
	
	transition: 0.5s; 
	-webkit-transition: 0.5s; 
	-moz-transition: 0.5s; 
}
.port-4.effect-1:hover .text-desc{
	opacity: 1;
	
	transform: rotateY(360deg) scale(1, 1);
	-webkit-transform: rotateY(360deg) scale(1, 1);
	-moz-transform: rotateY(360deg) scale(1, 1);
}
.port-4.effect-1:hover img{
	transform: rotateY(0deg) scale(0, 0);
	-webkit-transform: rotateY(0deg) scale(0, 0);
	-moz-transform: rotateY(0deg) scale(0, 0);
}

.port-4.effect-2{z-index: 12;}
.port-4.effect-2 img{
	transition: 0.5s; 
	-webkit-transition: 0.5s; 
	-moz-transition: 0.5s; 
	
	transform: rotateX(360deg) scale(1, 1);
	-webkit-transform: rotateX(360deg) scale(1, 1);
	-moz-transform: rotateX(360deg) scale(1, 1);
}
.port-4.effect-2 .text-desc{
	opacity: 0; padding: 45px 20px 20px;
	
	transform: rotateX(0deg) scale(0, 0);
	-webkit-transform: rotateX(0deg) scale(0, 0);
	-moz-transform: rotateX(0deg) scale(0, 0);
	
	transition: 0.5s; 
	-webkit-transition: 0.5s; 
	-moz-transition: 0.5s; 
}
.port-4.effect-2:hover .text-desc{
	opacity: 1;
	transform: rotateX(360deg) scale(1, 1);
	-webkit-transform: rotateX(360deg) scale(1, 1);
	-moz-transform: rotateX(360deg) scale(1, 1);
}
.port-4.effect-2:hover img{
	transform: rotateX(0deg) scale(0, 0);
	-webkit-transform: rotateX(0deg) scale(0, 0);
	-moz-transform: rotateX(0deg) scale(0, 0);
}

.port-4.effect-3 img{
	transition: 0.5s; 
	-webkit-transition: 0.5s; 
	-moz-transition: 0.5s; 
	
	transform: rotate(360deg) scale(1, 1);
	-webkit-transform: rotate(360deg) scale(1, 1);
	-moz-transform: rotate(360deg) scale(1, 1);
}
.port-4.effect-3 .text-desc{
	opacity: 0; padding: 45px 20px 20px;
	
	transform: rotate(0deg) scale(0, 0);
	-webkit-transform: rotate(0deg) scale(0, 0);
	-moz-transform: rotate(0deg) scale(0, 0);
	
	transition: 0.5s;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
}
.port-4.effect-3:hover .text-desc{
	opacity: 1;
	
	transform: rotate(360deg) scale(1, 1);
	-webkit-transform: rotate(360deg) scale(1, 1);
	-moz-transform: rotate(360deg) scale(1, 1);
}
.port-4.effect-3:hover img{
	transform: rotate(0deg) scale(0, 0);
	-webkit-transform: rotate(0deg) scale(0, 0);
	-moz-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;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
}
.port-5.effect-1:hover img{
	position: relative; z-index: 9; border: 6px solid rgba(255, 255, 255, 0.9);
	
	transform: scale(0.5) translateX(-100%); 
	-webkit-transform: scale(0.5) translateX(-100%); 
	-moz-transform: scale(0.5) translateX(-100%); 
}
.port-5.effect-1 .text-desc{
	opacity: 0; padding: 40px 20px 20px 90px; 
	
	transform: translateX(100%);
	-webkit-transform: translateX(100%);
	-moz-transform: translateX(100%);
	
	transition: 0.5s;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
}
.port-5.effect-1:hover .text-desc{
	opacity: 1;
	
	transform: translateX(0px);
	-webkit-transform: translateX(0px);
	-moz-transform: translateX(0px);
}

.port-5.effect-2{z-index: 10;}
.port-5.effect-2 img{
	transition: 0.5s;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
	
	transform: none;
	-webkit-transform: none;
	-moz-transform: none;
}
.port-5.effect-2:hover img{
	position: relative; z-index: 9; border: 6px solid rgba(255, 255, 255, 0.9);
	
	transform: scale(0.5) translateY(100%); 
	-webkit-transform: scale(0.5) translateY(100%); 
	-moz-transform: scale(0.5) translateY(100%); 
}
.port-5.effect-2 .text-desc{
	opacity: 0; padding: 20px;
	
	transform: translateY(-100%);
	-webkit-transform: translateY(-100%);
	-moz-transform: translateY(-100%);
	
	transition: 0.5s;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
}
.port-5.effect-2:hover .text-desc{
	opacity: 1;
	transform: translateY(0px);
	-webkit-transform: translateY(0px);
	-moz-transform: translateY(0px);
}

.port-5.effect-3 img{
	transition: 0.5s;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
}
.port-5.effect-3:hover img{
	position: relative; z-index: 9; border: 6px solid rgba(255, 255, 255, 0.9);
	
	transform: scale(0.5) translateX(100%);
	-webkit-transform: scale(0.5) translateX(100%);
	-moz-transform: scale(0.5) translateX(100%);
}
.port-5.effect-3 .text-desc{
	opacity: 0; padding: 40px 90px 20px 20px;
	
	transform: translateX(-100%);
	-webkit-transform: translateX(-100%);
	-moz-transform: translateX(-100%);
	
	transition: 0.5s;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
}
.port-5.effect-3:hover .text-desc{
	opacity: 1;
	
	transform: translateX(0px);
	-webkit-transform: translateX(0px);
	-moz-transform: translateX(0px);
}
/* 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;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;	
}
.port-6.effect-1:hover img{
	position: relative; z-index: 9;
	
	transform: scale(0.3) translateY(110%);
	-webkit-transform: scale(0.3) translateY(110%);
	-moz-transform: scale(0.3) translateY(110%);
}
.port-6.effect-1 .text-desc{
	opacity: 0; padding: 10px 20px;
	
	transform: translateY(-100%);
	-webkit-transform: translateY(-100%);
	-moz-transform: translateY(-100%);
	
	transition: 0.5s;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
}
.port-6.effect-1:hover .text-desc{
	opacity: 1;
	
	transform: translateY(0px);
	-webkit-transform: translateY(0px);
	-moz-transform: translateY(0px);
}

.port-6.effect-2{z-index: 7;}
.port-6.effect-2 img{
	z-index: 1;
	transition: 0.6s;
	-webkit-transition: 0.6s;
	-moz-transition: 0.6s;
}
.port-6.effect-2:hover img{
	position: relative; z-index: 9;
	
	transform: scale(0.3) translateX(110%);
	-webkit-transform: scale(0.3) translateX(110%);
	-moz-transform: scale(0.3) translateX(110%);
}
.port-6.effect-2 .text-desc{
	opacity: 0; padding: 40px 120px 20px 20px;
	
	transform: translateX(-100%);
	-webkit-transform: translateX(-100%);
	-moz-transform: translateX(-100%);
	
	transition: 0.6s;
	-webkit-transition: 0.6s;
	-moz-transition: 0.6s;
}
.port-6.effect-2:hover .text-desc{
	opacity: 1;
	
	transform: translateX(0px);
	-webkit-transform: translateX(0px);
	-moz-transform: translateX(0px);
}

.port-6.effect-3 img{
	transition: 0.5s;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
}
.port-6.effect-3:hover img{
	position: relative; z-index: 9;
	
	transform: scale(0.3) translateY(-110%);
	-webkit-transform: scale(0.3) translateY(-110%);
	-moz-transform: scale(0.3) translateY(-110%);
}
.port-6.effect-3 .text-desc{
	opacity: 0; padding: 85px 20px 10px;
	
	transform: translateY(100%);
	-webkit-transform: translateY(100%);
	-moz-transform: translateY(100%);
	
	transition: 0.5s;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
}
.port-6.effect-3:hover .text-desc{
	opacity: 1;
	
	transform: translateY(0px);
	-webkit-transform: translateY(0px);
	-moz-transform: translateY(0px);
}
/* 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
======================== */

纯CSS3鼠标滑过图片文字动画特效演示地址CSS3鼠标滑过图片效果

 
maolai
  • 本文由 maolai 发表于 2017年12月24日 19:37:40
  • 转载请务必保留本文链接:http://www.bokequ.com/459.html

发表评论