<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>正六边形旋转</title>
<style>
*{
margin: 0;
padding: 0;
}
.kevin{
width: 174px;
height: 100px;
margin: 50px auto;
position: relative;
transition: all 1s ease-in-out;
}
.hexagon{
width: 174px;
height: 100px;
background-color: rgba(0,0,0,0.4);
position: relative;
left: 0;
top: 0;
}
.hexagon:before{
content: "";
display: block;
width: 174px;
height: 100px;
background-color: rgba(0,0,0,0.4);
transform: rotate(60deg);
position: absolute;
left: 0;
top: 0;
}
.hexagon:after{
content: "";
display: block;
width: 174px;
height: 100px;
background-color: rgba(0,0,0,0.4);
transform: rotate(-60deg);
position: absolute;
left: 0;
top: 0;
}
.kevin:hover{
transform: rotate(360deg);
transition: all .5s ease-in-out;
}
</style>
</head>
<body>
<div class="kevin">
<div class="hexagon"></div>
</div>
</body>
</html>
点击查看更多内容
2人点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦