本文演示了四种不同的常用css3效果,你可以很方便的应用在手机或微信站上。包括上下移动,图片放大或缩小,旋转效果等。演示demo请用高级浏览器查看。
演示一: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);
}
系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791