It seems a pity that this blog is full of desert grass ..
Today, I saw some people say that google's Tomb Sweeping Day effect is good. I just wrote it out without having to worry about it.
If the number of words is not enough, it cannot be published. If you have to, let's talk about the ideas for cainiao's reference.
First, the rain points are treated as an object, and some attributes are fixed for them, such as the animation execution interval, the number of animation executions, and the height interval of the background image, and input the parameter of the raindrops position (x, y.
The rest is to create a span element, that is, the rain in the legend. Of course, using background positioning to simulate the animation effect, you know, google is not the first time doing this.
It is worth mentioning that the transform of css3 is used. It seems that this attribute function is very powerful. If you are interested, you can search for it on your own. So much nonsense, code...
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8 "> <meta http-equiv =" X-UA-Compatible "content =" IE = EmulateIE7 "> <br/> <style type =" text/css "> html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, B, u, I, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend {margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }</p> <p> ul {list-style: none ;} table {border-collapse: collapse; border-spacing: 0;} td, input, textarea, select, option {font-size: 12px; font-family: tahoma ;} a {color: #959595; text-decoration: none;} a: hover {color: #333;} img, fieldset {border: 0 none;} form {margin: 0 ;}</p> <p> html {height: 100%; width: 100% ;}body {background-color: # fff; height: 100%; width: 100%; position: relative; background: url (http://www.google.com.hk/images/easteregg/qingming_willow.png) right top no-repeat; overflow: hidden;} </style> <p>
Run code