<!DOCTYPE HTML> |
<html lang= "en-US" > |
<head> |
<meta charset= "UTF-8" > |
<title>CSS 3 制作莲花盛开动画</title> |
<link href= "base.css" rel= "stylesheet" type= "text/css" > |
<script type= "text/javascript" src= "prefixfree.min.js" ></script> |
<style type= "text/css" media= "screen" > |
body { |
background-color : #d4d4d4 ; |
} |
.demo { |
margin : 40px auto 0 ; |
width : 500px ; |
} |
.box { |
position : relative ; |
height : 400px ; |
} |
.box .leaf { |
position : absolute ; |
} |
.leaf { |
margin-top : 400px ; |
width : 300px ; |
height : 300px ; |
border-radius: 300px 0px ; |
background : -*-linear-gradient( 45 deg, rgba( 188 , 190 , 192 , 1 ) 8% , rgba( 158 , 31 , 99 , 1 ) 30% , rgba( 158 , 31 , 99 , 1 ) 100% ); |
opacity: 0.5 ; |
filter:alpha(opacity= 50 ); |
transform: rotate( 45 deg); |
transform-origin: top right ; |
} |
.leaf:nth-child( 2 ) { |
animation: show -2 5 s ease-in-out infinite; |
} |
.leaf:nth-child( 3 ) { |
animation: show -3 5 s ease-in-out infinite; |
} |
.leaf:nth-child( 4 ) { |
animation: show -4 5 s ease-in-out infinite; |
} |
.leaf:nth-child( 5 ) { |
animation: show -5 5 s ease-in-out infinite; |
} |
.leaf:nth-child( 6 ) { |
animation: show -6 5 s ease-in-out infinite; |
} |
.leaf:nth-child( 7 ) { |
animation: show -7 5 s ease-in-out infinite; |
} |
.leaf:nth-child( 8 ) { |
animation: show -8 5 s ease-in-out infinite; |
} |
@keyframes show -2 { |
0% { |
transform: rotate( 45 deg); |
} |
100% { |
transform: rotate( 71 deg); |
} |
} |
@keyframes show -3 { |
0% { |
transform: rotate( 45 deg); |
} |
100% { |
transform: rotate( 96 deg); |
} |
} |
@keyframes show -4 { |
0% { |
transform: rotate( 45 deg); |
} |
100% { |
transform: rotate( 123 deg); |
} |
} |
@keyframes show -5 { |
0% { |
transform: rotate( 45 deg); |
} |
100% { |
transform: rotate( 149 deg); |
} |
} |
@keyframes show -6 { |
0% { |
transform: rotate( 45 deg); |
} |
100% { |
transform: rotate( 175 deg); |
} |
} |
@keyframes show -7 { |
0% { |
transform: rotate( 45 deg); |
} |
100% { |
transform: rotate( 200 deg); |
} |
} |
@keyframes show -8 { |
0% { |
transform: rotate( 45 deg); |
} |
100% { |
transform: rotate( 225 deg); |
} |
} |
</style> |
</head> |
<body> |
<div class= "page" > |
<header id= "header" > |
<hgrounp class= "white blank" > |
<h 1 >CSS 3 制作莲花盛开动画</h 1 > |
<h 2 > 作者:藤藤 </h 2 > |
</hgrounp> |
</header> |
<section class= "demo" > |
<div class= "box" > |
<div class= "leaf" ></div> |
<div class= "leaf" ></div> |
<div class= "leaf" ></div> |
<div class= "leaf" ></div> |
<div class= "leaf" ></div> |
<div class= "leaf" ></div> |
<div class= "leaf" ></div> |
<div class= "leaf" ></div> |
</div> |
</section> |
</div> |
</body> |
</html> |