纯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

AI Hentai Generator
Generate AI Hentai for free.

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



The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.
