本文演示了四种不同的常用css3效果,你可以很方便的应用在手机或微信站上。包括上下移动,图片放大或缩小,旋转效果等。演示demo请用高级浏览器查看。
0、请不要问“在不在”之类的问题,有问题直接问!1、学生或暂时没有工作的童鞋,整站资源免费下载!2、¥9.9充值终身VIP会员,加我微信,826096331 拉你进VIP群学习!3、程序员加油,技术改变世界。在线 充值
演示一:360度旋转
<a class="rotate">360度旋转</a>
.rotate {
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;
width: 200px;
height: 200px;
background-color: #000000;
display: block;
margin: 100px auto;
color: #fff;
text-align: center;
line-height: 200px;
font-size: 20px;
font-weight: bold;
}
.rotate:hover {
transform: rotate(360deg);
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-o-transform: rotate(360deg);
-ms-transform: rotate(360deg);
}
演示二:放大效果
<a class="scale">放大效果</a>
.scale {
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;
width: 200px;
height: 200px;
background-color: #000000;
display: block;
margin: 100px auto;
color: #fff;
text-align: center;
line-height: 200px;
font-size: 20px;
font-weight: bold;
}
.scale:hover {
transform: scale(1.2);
-webkit-transform: scale(1.2);
-moz-transform: scale(1.2);
-o-transform: scale(1.2);
-ms-transform: scale(1.2);
}
演示三:旋转放大
<a class="rotate_scale">旋转放大</a>
.rotate_scale {
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;
width: 200px;
height: 200px;
background-color: #000000;
display: block;
margin: 100px auto;
color: #fff;
text-align: center;
line-height: 200px;
font-size: 20px;
font-weight: bold;
}
.rotate_scale: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);
-ms-transform: rotate(360deg) scale(1.2);
}
演示四:上下移动
<a class="move">上下移动</a>
.move {
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;
width: 200px;
height: 200px;
background-color: #000000;
display: block;
margin: 100px auto;
color: #fff;
text-align: center;
line-height: 200px;
font-size: 20px;
font-weight: bold;
}
.move: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);
}
友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群