css3+jq创作含苞待放的荷花
网站建设 2023-01-28 21:39www.1681989.com免费网站
复制代码
代码如下:<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>flower</title>
<style type="text/css">body,html,div,span,p,ul,li{marg:0;paddg:0;}
body{ background:#000;}
#flower{width:300px; position:absolute; :50%;left:50%; marg:-115px 0 0 -150px; height:330px;}
#leaf { position:relative; z-dex:2;}
#leaf strong{ width:75px; height:75px; display:block; border:1px solid #FB96C2; box-shadow:0 0 1px #FB96C2; / background:red;/ background:-webkit-lear-gradient(, #fff ,#FFAFD6 30%, #F493C0 70%,#DB5E86 100%); border-radius:75px 0 75px 0; -webkit-transform:rotate(90deg); position:absolute; transition:all 0.5s; }
#leaf strong:first-child{-webkit-transform:rotate(130deg);}
#leaf strong:nth-child(2){-webkit-transform:rotate(120deg); left:-12px; :7px;}
#leaf strong:nth-child(3){-webkit-transform:rotate(143deg); left:12px; :7px;}
#leaf strong:nth-child(4){-webkit-transform:rotate(150deg); left:12px; :7px;}
#leaf strong:nth-child(5){-webkit-transform:rotate(120deg); left:-12px; :7px;}
#leaf strong:nth-child(6){-webkit-transform:rotate(160deg); left:26px; :11px;}
#leaf strong:nth-child(7){-webkit-transform:rotate(105deg); left:-26px; :11px;}
/#leaf strong:nth-child(4){-webkit-transform:rotate(110deg); left:-18px; :12px;}
#leaf strong:nth-child(5){-webkit-transform:rotate(170deg); left:18px; :12px;}
#leaf strong:nth-child(6){-webkit-transform:rotate(185deg); left:38px; :27px;}
#leaf strong:nth-child(7){-webkit-transform:rotate(85deg); left:-38px; :27px;}/
#three{ position:relative; marg-:-10px;}
#three div{width:8px; height:200px; background:#390; marg:100px 0 0 37px; border-radius:10px; position:absolute; z-dex:1; border-radius:200px 0 0 0;}
#three strong{width:6px; height:6px; border-radius:6px; background:#3B7B6D; display:le-block; position:absolute; left:34px; :115px;}
#three strong:nth-child(2){:150px;left:45px;}
#three strong:nth-child(3){:185px}
#three strong:nth-child(4){:220px;left:45px;}
#three strong:nth-child(5){:255px}</style>
</head>
<body>
<div id="flower">
<div id="leaf">
<strong></strong>
<strong></strong>
<strong></strong>
<strong></strong>
<strong></strong>
<strong></strong>
<strong></strong>
</div>
<div id="three">
<div></div>
<strong></strong>
<strong></strong>
<strong></strong>
<strong></strong>
<strong></strong>
<strong></strong>
<strong></strong>
<strong></strong>
<strong></strong>
<strong></strong>
</div>
</div>
<script type="text/javascript" src="http://code.jquery./jquery.m.js"></script>
<script type="text/javascript">$(function(){
setTimeout(function(){
$("#leaf strong:eq(6)").css({left:'-38px',:'27px',transform:'rotate(85deg)'})
$("#leaf strong:eq(5)").css({left:'38px',:'27px',transform:'rotate(185deg)'})
$("#leaf strong:eq(4)").css({left:'-18px',:'12px',transform:'rotate(110deg)'})
$("#leaf strong:eq(3)").css({left:'18px',:'12px',transform:'rotate(170deg)'})
},1000)
setTimeout(function(){
$("#leaf strong:eq(6)").css({:'48px',left:'-38px',transform:'rotate(80deg)'})
$("#leaf strong:eq(5)").css({left:'45',:'48px',transform:'rotate(190deg)'})
$("#leaf strong:eq(4)").css({left:'-42px',:'28px',transform:'rotate(95deg)'})
$("#leaf strong:eq(3)").css({left:'42px',:'28px',transform:'rotate(165deg)'})
},2000)
setTimeout(function(){
$("#leaf strong:eq(6)").css({:'300px',left:'10px'})
},3000)
setTimeout(function(){
$("#leaf strong:eq(5)").css({:'270px',left:'100px'})
},3100)
setTimeout(function(){
$("#leaf strong:eq(4)").css({:'210px',left:"-70px"})
},3200)
setTimeout(function(){
$("#leaf strong:eq(3)").css({:'160px',left:"50px"})
},3300)
})</script>
</body>
</html>
上一篇:搞清楚CSS中单位px与em之间的关系和特点
下一篇:常用的四种CSS透明属性介绍