首页 > Web开发 > 详细

CSS3 perspecitve属性

时间:2014-08-01 18:32:02      阅读:308      评论:0      收藏:0      [点我收藏+]
M

M
.div1
{
	position: relative;
	height: 150px;
	width: 150px;
	margin: 0px;
	padding:2px;
	border: 1px solid black;
	perspective:550;
	-webkit-perspective:550;
	perspective-origin: 50% 100px;
	-webkit-perspecitve-origin: 50% 100px;
}

.div2
{
	position: absolute;
	border: 1px solid black;
	background-color: yellow;
	transform: rotateX(0deg);
	-webkit-transform: rotateX(0deg);
	-webkit-animation: rotateXing 1.8s infinite linear;
	animation: rotateXing 1.8s infinite linear;
	width:148px;
	height:148px;
	text-align:center;
	line-height:148px;
}
.div3
{
	position: absolute;
	border: 1px solid black;
	background-color: green;
	transform: rotateY(0deg);
	-webkit-transform: rotateY(0deg);
	-webkit-animation: rotateYing 2.8s infinite linear;
	animation: rotateYing 2.8s infinite linear;
	width:148px;
	height:148px;
	text-align:center;
	line-height:148px;
}
@-webkit-keyframes rotateXing {
  from {
  	transform: rotateX(1deg);
	-webkit-transform: rotateX(1deg);
  }
  to {
    transform: rotateX(359deg);
	-webkit-transform: rotateX(359deg);
  }
}
@keyframes rotateXing {
   from {
  	transform: rotateX(1deg);
	-webkit-transform: rotateX(1deg);
  }
  to {
    transform: rotateX(359deg);
	-webkit-transform: rotateX(359deg);
  }
}
@-webkit-keyframes rotateYing {
  from {
  	transform: rotateY(1deg);
	-webkit-transform: rotateY(1deg);
  }
  to {
    transform: rotateY(359deg);
	-webkit-transform: rotateY(359deg);
  }
}
@keyframes rotateYing {
   from {
  	transform: rotateY(1deg);
	-webkit-transform: rotateY(1deg);
  }
  to {
    transform: rotateY(359deg);
	-webkit-transform: rotateY(359deg);
  }
}

  

CSS3 perspecitve属性,布布扣,bubuko.com

CSS3 perspecitve属性

原文:http://www.cnblogs.com/hubj/p/3885106.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!