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="windows-1250"> <title>V&V|Vodní dýmka</title> <script src="script.js"></script> <link rel="stylesheet" type="text/css" href="Style.css"> </head> <body> <menu class="menu3 fixni-menu" id="menu3"> <li><a href="Index.HTML">HOMEPAGE</a></li> <li><a href="Clanky.HTML">VODNÍ DÝMKA</a></li> <li><a href="Videa.HTML">VIDEA</a></li> <li><a href="Foto.HTML">FOTOGALERIE</a></li> <li><a href="Bazar.HTML">NÁŠ BAZAR</a></li> <li><a href="Kontakt.HTML">KONTAKT</a></li> </menu> <div class="slideshow"> <img src="Images/Vodnice.jpeg" class="show"> <img src="Images/Tabak.jpeg"> <img src="Images/Uhliky.jpeg"> </div> </body> </html>
HTML
Autoformát
Standardní režim
Mobilní zobrazení
body { background-image: URL('Images/Background.PNG'); background-size: 100%; background-repeat: no-repeat; background-attachment: fixed; background-color: black; color: white; } a:link {color: black} a:visited {color: black} a:active {color: black} .menu3 {list-style: none; padding: 0; margin: 0; text-align: center} .menu3 li {display: inline} .menu3 a {text-decoration: none; border-bottom: 0; background: URL('Images/Menu-block.PNG'); padding: 5px; display: inline-block; width: 150px; line-height: 30px} .fixni-menu {position: fixed; left: 0; top: 0; width: 100%; background: URL('Images/Menu.PNG'); text-align: center; z-index: 1} .slideshow { width: 600px; position: relative; max-width: 100%; } .slideshow img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; filter: alpha(opacity=0); transition: opacity .4s; } .slideshow .show { opacity: 1; filter: alpha(opacity=100); } .slideshow .stoped { z-index: 1; } .slideshow :first-child { position: relative; display: block; }
CSS
Autoformát
CSS reset
Až na konci
var menu = document.getElementById('fixni-menu'); window.onscroll = function () { menu.className = ( document.documentElement.scrollTop + document.body.scrollTop > menu.parentNode.offsetTop && document.documentElement.clientHeight > menu.offsetHeight ) ? "fixni-menu" : ""; } (function(el, time) { var timer; var active = 0; var img = el.querySelectorAll("img"); var imgCount = img.length; function change() { img[active].className = ""; if (active == (imgCount - 1)) { active = 0; } else { active = active + 1; } img[active].className = "show"; } timer = setInterval(change, time); el.onmouseover = function() { clearInterval(timer); img[active].className = "show stoped"; }; el.onmouseout = function() { timer = setInterval(change, time); }; el.onclick = change; })( document.querySelector(".slideshow"), 3 * 1000 );
J
ava
S
cript
Autoformát
jQuery
Umístění JS
window.onload
</head>
</body>