码迷,mamicode.com
首页 > 其他好文 > 详细

旋转轴心案例

时间:2018-12-27 03:07:56      阅读:100      评论:0      收藏:0      [点我收藏+]

标签:hover   auto   osi   top   -o   position   pre   tran   margin   

<style>
*{
padding: 0;
margin: 0;
}
.pkBox{
width: 155px;
height: 219px;
margin: 200px auto;
position: relative;
}
.pkBox>img{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
transition: transform 2s;
transform-origin: right top;
}
.pkBox:hover>img:nth-of-type(1){
transform: rotate(60deg);
}
.pkBox:hover>img:nth-of-type(2){
transform: rotate(120deg);
}
.pkBox:hover>img:nth-of-type(3){
transform: rotate(180deg);
}
.pkBox:hover>img:nth-of-type(4){
transform: rotate(240deg);
}
.pkBox:hover>img:nth-of-type(5){
transform: rotate(300deg);
}
.pkBox:hover>img:nth-of-type(6){
transform: rotate(360deg);
}

</style>
</head>
<body>
<div class="pkBox">
<img src="images/img/pk1.png" >
<img src="images/img/pk2.png" >
<img src="images/img/pk1.png" >
<img src="images/img/pk2.png" >
<img src="images/img/pk1.png" >
<img src="images/img/pk2.png" >
</div>

旋转轴心案例

标签:hover   auto   osi   top   -o   position   pre   tran   margin   

原文地址:https://www.cnblogs.com/lujieting/p/10182614.html

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