纯css3流星雨_html/css_WEB-ITnose
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>meteor</title> 6 <style> 7 *{ 8 padding:0; 9 margin:0; 10 } 11 body{ 12 background-color:#000; 13 overflow:hidden; 14 } 15 .author{ 16 color:#fff; 17 font:18px/1.5 "微软雅黑"; 18 animation:change 4s infinite; 19 } 20 .star{ 21 width:4px; 22 height:4px; 23 background-color:#fff; 24 display:block; 25 position:absolute; 26 top:110px; 27 right:800px; 28 border-radius:4px; 29 animation:star 1s infinite linear; 30 opacity:0; 31 } 32 .star:after{ 33 position:relative; 34 display:block; 35 top:-49px; 36 left:23px; 37 border:2px solid #fff; 38 border-width:0 0 0 1px; 39 width:100px; 40 height:100px; 41 content:""; 42 transform:rotate(45deg); 43 } 44 .blue{ 45 background-color:lightskyblue; 46 top:60px; 47 right:600px; 48 animation-delay:0.25s; 49 } 50 .blue:after{ 51 width:200px; 52 height:200px; 53 top:-99px; 54 left:43px; 55 border:2px solid lightskyblue; 56 border-width:0 0 0 1px; 57 } 58 .pink{ 59 background-color:lightpink; 60 top:160px; 61 right:500px; 62 animation:starPink 1s infinite linear; 63 animation-delay:0.5s; 64 } 65 .pink:after{ 66 width:133px; 67 height:133px; 68 top:-65px; 69 left:29px; 70 border:2px solid lightpink; 71 border-width:0 0 0 1px; 72 } 73 .yellow{ 74 background-color:yellow; 75 top:127px; 76 right:261px; 77 animation:starYellow 1s infinite linear; 78 animation-delay:0.75s; 79 } 80 .yellow:after{ 81 width:209px; 82 height:164px; 83 top:-65px; 84 left:29px; 85 border:2px solid yellow; 86 border-width:0 0 0 1px; 87 } 88 @keyframes change{ 89 0%{ 90 color:#fff; 91 } 92 25%{ 93 color:lightskyblue; 94 } 95 50%{ 96 color:lightpink; 97 } 98 75%{ 99 color:yellow;100 }101 }102 @keyframes star{103 0%{104 opacity:0;105 transform:scale(0) translate(0,0);106 }107 50%{108 opacity:1;109 transform:scale(1) translate(-200px,200px);110 }111 100%{112 opacity:0;113 transform:scale(1) translate(-400px,400px);114 }115 }116 @keyframes starPink{117 0%{118 opacity:0;119 transform:scale(0) translate(0,0);120 }121 50%{122 opacity:1;123 transform:scale(1) translate(-300px,300px);124 }125 100%{126 opacity:0;127 transform:scale(1) translate(-600px,600px);128 }129 }130 @keyframes starYellow{131 0%{132 opacity:0;133 transform:scale(0) translate(0,0);134 }135 50%{136 opacity:1;137 transform:scale(1) translate(-300px,300px);138 }139 100%{140 opacity:0;141 transform:scale(1) translate(-600px,600px);142 }143 }144 </style>145 </head>146 <body>147 <span class="author">by Scott</span>148 <span class="star"></span>149 <span class="star blue"></span>150 <span class="star pink"></span>151 <span class="star yellow"></span>152 </body>153 </html>
demo 链接:http://wangpengfei15975.github.io/MyBlog

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

To achieve the effect of scattering and enlarging the surrounding images after clicking on the image, many web designs need to achieve an interactive effect: click on a certain image to make the surrounding...

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

How to distinguish between closing tabs and closing entire browser using JavaScript on your browser? During the daily use of the browser, users may...
