1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
| <!DOCTYPE html> <html lang="en">
<head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <link href="//netdna.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"> <style> * { margin: 0; padding: 0; }
main { height: 100vh; width: 100vw; background-color: #34495e; display: flex; justify-content: center; align-items: center; }
div { height: 100px; width: 100px; background: radial-gradient(at center, #e67e22, #e74c3c); border-radius: 50%; animation-name: ball; animation-duration: 1s; z-index: 1; animation-iteration-count: infinite; animation-direction: alternate-reverse; }
@keyframes ball { to { transform: translateY(-300px); } }
section { width: 300px; height: 40px; background: rgba(0, 0, 0, 0.3); position: absolute; transform: translateY(50px); border-radius: 50%; z-index: 0; filter: blur(5px); animation-name: shadow; animation-duration: 1s; animation-iteration-count: infinite; animation-direction: alternate-reverse; }
@keyframes shadow { to { width: 300px; height: 20px; filter: blur(35px); background: rgba(0, 0, 0, 0.1); } } </style> </head>
<body> <main> <div></div> <section></section> </main> </body>
</html>
|