css3 实现折扇效果

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>css3 实现折叠扇效果</title>
		<style type="text/css" media="screen">
			*{margin:0; padding:0;}
			.box{position:relative;width:600px;height:230px;margin:100px auto;border-bottom:2px solid #000;}
			.box div{position:absolute;top:0;left:270px;width:60px;height:200px;opacity:0;color:#fff;transform-origin: center bottom;transition: all 1s;}
			.box:hover div{opacity:1;}
			.box div:nth-of-type(1){background-color:#5628B4;opacity:1;}
			.box div:nth-of-type(2){background-color:#232855;}
			.box div:nth-of-type(3){background-color:#37474F;}
			.box div:nth-of-type(4){background-color:#EE046C;}
			.box div:nth-of-type(5){background-color:#4A2C2C;}
			.box div:nth-of-type(6){background-color:#6B0848;}
			.box div:nth-of-type(7){background-color:#AF05AA;}
			.box div:nth-of-type(8){background-color:#AF05AA;}
			.box div:nth-of-type(9){background-color:#6B0848;}
			.box div:nth-of-type(10){background-color:#4A2C2C;}
			.box div:nth-of-type(11){background-color:#EE046C;}
			.box div:nth-of-type(12){background-color:#37474F;}
			.box div:nth-of-type(13){background-color:#232855;}
			.box:hover div:nth-of-type(1){transform: rotate(0deg)}
			.box:hover div:nth-of-type(2){transform: rotate(15deg)}
			.box:hover div:nth-of-type(3){transform: rotate(30deg)}
			.box:hover div:nth-of-type(4){transform: rotate(45deg)}
			.box:hover div:nth-of-type(5){transform: rotate(60deg)}
			.box:hover div:nth-of-type(6){transform: rotate(75deg)}
			.box:hover div:nth-of-type(7){transform: rotate(90deg)}
			.box:hover div:nth-of-type(8){transform: rotate(-90deg)}
			.box:hover div:nth-of-type(9){transform: rotate(-75deg)}
			.box:hover div:nth-of-type(10){transform: rotate(-60deg)}
			.box:hover div:nth-of-type(11){transform: rotate(-45deg)}
			.box:hover div:nth-of-type(12){transform: rotate(-30deg)}
			.box:hover div:nth-of-type(13){transform: rotate(-15deg)}
		</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>

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值