折扇案例

在这里插入图片描述

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style>
*{padding:0;margin:0;}
.box{width:600px;
     height:230px;
   margin:50px auto;
   position:relative;
   border-bottom:solid 2px #000;
   }
.box div{
   width:60px;
   height:200px;
   transition:all 1s;
   transform-origin:center bottom;
   position:absolute;
   left:40%;
   box-shadow:3px 3px 5px #333;
   }
.box div:nth-child(1){
	   background:red;
	  } 
.box:hover div:nth-child(2){
	background:orange;
	transform:rotate(15deg);
	}
.box:hover div:nth-child(3){
	background:yellow;
	transform:rotate(30deg);
	}	  
.box:hover div:nth-child(4){
	background:green;
	transform:rotate(45deg);
	}
.box:hover div:nth-child(5){
	background:blue;
	transform:rotate(60deg);
	}		  
.box:hover div:nth-child(6){
	background:cyan;
	transform:rotate(75deg);
	}
.box:hover div:nth-child(7){
	background:purple;
	transform:rotate(90deg);
	}

.box:hover div:nth-last-child(1){
	background:orange;
	transform:rotate(-15deg);
	}
.box:hover div:nth-last-child(2){
	background:yellow;
	transform:rotate(-30deg);
	}	  
.box:hover div:nth-last-child(3){
	background:green;
	transform:rotate(-45deg);
	}
.box:hover div:nth-last-child(4){
	background:blue;
	transform:rotate(-60deg);
	}		  
.box:hover div:nth-last-child(5){
	background:cyan;
	transform:rotate(-75deg);
	}
.box:hover div:nth-last-child(6){
	background:purple;
	transform:rotate(-90deg);
	}    
    </style>
</head>

<body>
<div class="box">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>7</div>
<div>6</div>
<div>5</div>
<div>4</div>
<div>3</div>
<div>2</div>
</div>
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值