首页 > 其他 > 详细

translate

时间:2016-04-12 19:30:10      阅读:252      评论:0      收藏:0      [点我收藏+]

translate的百分比好像是根据该元素的宽高来定的

比如 

.btn{position:relative; width: 150px; height: 40px; line-height: 40px; border: 1px solid #ddd; color: #333; text-align: center; margin-right: 30px; float: left;  transition: all 1s linear;}

.btn span{
position: absolute;
top:0;
left: 50%;//相对btn元素而言偏移75px
width: 500px;
height: 500px;
display: block;
transition: all .4s linear;
z-index: -1;
border-radius: 50%;
transform:translate(-50%,-50%);//对原来位置偏移250px
}

 

translate

原文:http://www.cnblogs.com/haitangxun/p/5383550.html

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