Nová ukázka
Reset
Načíst z URL
Uložit a získat odkaz
Vztahuje se k…
Nevyplňujte
Napiště „nejsem robot“
▶
Přepnout zobrazení
Výsledek
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> </head> <body> <div> <span>A</span> <span>B</span> <span>C</span> <span>D</span> </div> </body> </html>
HTML
Autoformát
Standardní režim
Mobilní zobrazení
div { border: 1px solid black; height: 5rem; text-align: center; line-height: 5rem; position: relative; overflow: hidden; } span { font-family: Tahoma; font-size: 30px; display: block; position: absolute; left: 0; right: 0; bottom: 0; top: 0; background: #fff; opacity: 0; transform: translateY(-7rem); } span:nth-child(1) { color: green; animation: show ease-in-out 500ms 2s forwards, hide ease-in-out 500ms 16s forwards ; } span:nth-child(2) { color: red; animation: show ease-in-out 500ms 4s forwards, hide ease-in-out 500ms 14s forwards; } span:nth-child(3) { color: blue; animation: show ease-in-out 500ms 6s forwards, hide ease-in-out 500ms 12s forwards ; } span:nth-child(4) { color: indigo; animation: show ease-in-out 500ms 8s forwards, hide ease-in-out 500ms 10s forwards ; } @keyframes show { 0% { opacity: 0; } 100% { opacity: 100%; transform: translateY(0); } } @keyframes hide { 0% { opacity: 100%; } 100% { opacity: 0%; transform: translateY(-7rem); } }
CSS
Autoformát
CSS reset
Až na konci
J
ava
S
cript
Autoformát
jQuery
Umístění JS
window.onload
</head>
</body>