CSS 风车
添加边框后不改变原本设计的大小:
Box-sizing:border-box;
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
/*静止系统默认滚动条*/
html,body{
height: 100%;
overflow: hidden;
}
#warp{
width: 300px;
height:300px;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
transition: 2s;
}
#warp div{
margin: 10px;
width: 130px;
height: 130px;
float: left;
background: palegoldenrod;
box-sizing: border-box;
}
#warp>div:nth-child(1),#warp>div:nth-child(4){
border-radius: 0 60%;
}
#warp>div:nth-child(2),#warp>div:nth-child(3){
border-radius: 60% 0;
}
#warp:hover{
/*旋转360度*/
transform: rotate(3600deg);
}
</style>
</head>
<body>
<div id="warp">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>