码迷,mamicode.com
首页 > Web开发 > 详细

CSS3 perspecitve属性

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

标签:style   blog   color   os   io   for   cti   ar   

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属性

标签:style   blog   color   os   io   for   cti   ar   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!