Welcome to CODEBOX! (Branch 2156)
✨ KALYARAK CHOOBPHA
<div class="screen"> <img src="https://media.discordapp.net/attachments/787691090391859253/809831480754176001/pjabont.png" class="sun" id="myImg1" alt="P' Jabont"> <img src="https://media.discordapp.net/attachments/806818690737504276/809452280856313896/nest1.png" class="tele_red" id="myImg2" alt="Nest"> <img src="https://media.discordapp.net/attachments/806818690737504276/809494077787209768/mew.png" class="tele_yel" id="myImg3" alt="Miew"> <img src="https://i.imgur.com/T7C1Ydq.png" class="tele_pink" id="myImg4" alt="Parn"> <img src="https://media.discordapp.net/attachments/787691090391859253/809836006123634708/23.png?width=645&height=670" class="tele_orange" id="myImg5" alt="Fench"> <img src="https://media.discordapp.net/attachments/806818690737504276/809509329735647262/oat.png" class="tele_purple" id="myImg6" alt="Oat"> <img src="https://media.discordapp.net/attachments/787691090391859253/809837983863537714/lt.png?width=342&height=670" class="tele_green" id="myImg7" alt="Tal"> <img src="https://media.discordapp.net/attachments/787691090391859253/809837205023358986/pae.png?width=433&height=669" class="tele_cyan" id="myImg8" alt="Pae"> <img src="https://media.discordapp.net/attachments/806818690737504276/809721036282527745/jane.png" class="tele_blue" id="myImg9" alt="Jen"> <img src="https://i.imgur.com/8Y6I5cH.png" class="flower" id="myImg10"alt="P'Faii"> </div> <div class="hidden-Sound"> <audio class="background-sound"autoplay loop> <source src="https://ia601403.us.archive.org/6/items/teletubbies-full-remix_202102/TELETUBBIES%20FULL%20REMIX%21%21.mp3"type="audio/mp3"> </audio> <div id="myModal" class="modal"> <span class="close">×</span> <img class="modal-content" id="img01"> <div id="caption"></div> </div> <style> @import url('https://fonts.googleapis.com/css2?family=Balsamiq+Sans:wght@700&display=swap'); body{ background:#274537; } .screen{ width: 1450px; height: 730px; background: url(https://media.architecturaldigest.com/photos/5c4a3a2892ce212ce3f514bd/4:3/w_2168,h_1626,c_limit/teletubbies-01.jpg); background-repeat: no-repeat; position:relative; background-size: cover; overflow:hidden; left: 5em; top: 2.5em; border-radius: 5%; box-shadow: 8px 8px 10px #416d59; border: 5px outset #b2f7d7; animation: bg 25s infinite; background-size: 120% 150%; } img{ position:absolute; height: 200px; right: 20%; /* bottom: %; */ top: 35%; font-family: 'Balsamiq Sans', cursive; } .tele_red{ transform : scale(0); animation: appear 2s forwards, nestwalk 2s 2.5s forwards,jump 1s 35s alternate infinite linear; } .tele_yel{ transform : scale(0); animation: appear 2s 5.5s forwards, miewwalk 2s 8s forwards,jump 1s 36s alternate infinite linear; } .tele_pink{ height: 265px; right: 40%; transform : scale(0); animation: appear 2s 10s forwards, parnwalk 2s 12.3s forwards,jump 1s 37s alternate infinite linear; } .tele_orange{ height: 275px; transform : scale(0); animation: appear 2s 14.8s forwards, fenchwalk 2s 16.3s forwards, jump 1s 42s alternate infinite linear; } .tele_purple{ height: 280px; transform : scale(0); animation: appear 2s 18.8s forwards, oatwalk 2s 20.3s forwards, jump 1s 41s alternate infinite linear; } .tele_green{ height: 250px; transform : scale(0); animation: appear 2s 23s forwards, ltwalk 2s 25.3s forwards, jump 1s 40s alternate infinite linear; } .tele_cyan{ transform : scale(0); animation: appear 2s 27.6s forwards, paewalk 2s 29.3s forwards, jump 1s 39s alternate infinite linear; } .tele_blue{ height: 280px; transform : scale(0); animation: appear 2s 31.6s forwards, janewalk 2s 33.3s forwards, jump 1s 38s alternate infinite linear; } .sun{ top: 30px; left: 70px; transform:scale(0); animation: appear 2s infinite alternate; } .flower{ top: 40px; left: 1200px; animation: spin 5s infinite alternate cubic-bezier(1,.01,.37,.86); } @keyframes appear{ from{transform:scale(0);} to{transform:scale(1.2);} } @keyframes spin{ 0%{ transform:rotateZ(45deg); } 40%{ transform:rotateZ(-45deg) scale(1.5); } 100%{ transform:rotateZ(360deg) scale(0); opacity: 0; } } @keyframes nestwalk{ to{right:1em; top: 30em;} } @keyframes miewwalk{ to{right:13em; top: 28em;} } @keyframes parnwalk{ to{right:25em; top: 28em;} } @keyframes fenchwalk{ to{right:75em; top: 27em;} } @keyframes oatwalk{ to{right:60em; top: 26em;} } @keyframes ltwalk{ to{right:55em; top: 28em;} } @keyframes paewalk{ to{right:45em; top: 30em;} } @keyframes janewalk{ to{right:35em; top: 28em;} } @keyframes jump{ to{ bottom: 4.5em; transform: scale(1.5); } } @keyframes bg { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } /* ส่วนข้างPopup */ #myImg1 { border-radius: 5px; cursor: pointer; transition: 0.3s; } #myImg1:hover {opacity: 0.7;} #myImg2 { border-radius: 5px; cursor: pointer; transition: 0.3s; } #myImg2:hover {opacity: 0.7;} #myImg3 { border-radius: 5px; cursor: pointer; transition: 0.3s; } #myImg3:hover {opacity: 0.7;} #myImg4 { border-radius: 5px; cursor: pointer; transition: 0.3s; } #myImg4:hover {opacity: 0.7;} #myImg5 { border-radius: 5px; cursor: pointer; transition: 0.3s; } #myImg5:hover {opacity: 0.7;} #myImg6{ border-radius: 5px; cursor: pointer; transition: 0.3s; } #myImg6:hover {opacity: 0.7;} #myImg7 { border-radius: 5px; cursor: pointer; transition: 0.3s; } #myImg7:hover {opacity: 0.7;} #myImg8 { border-radius: 5px; cursor: pointer; transition: 0.3s; } #myImg8:hover {opacity: 0.7;} #myImg9 { border-radius: 1px; cursor: pointer; transition: 0.3s; } #myImg9:hover {opacity: 0.7;} #myImg10 { border-radius: 1px; cursor: pointer; transition: 0.3s; } #myImg10:hover {opacity: 0.7;} /* The Modal (background) */ .modal { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 1; /* Sit on top */ padding-top: 50px; /* Location of the box */ left: 0; top: 0; width: 100%; /* Full width */ height: 100%; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgb(0,0,0); /* Fallback color */ background-color: rgba(0,0,0,0.7); /* Black w/ opacity */ } /* Modal Content (image) */ .modal-content { margin-top: auto; display: block; width: 80%; max-width: 2000px; } /* Caption of Modal Image */ #caption { display: block; width: 80%; max-width: 700px; text-align: center; color: whitesmoke; padding: 10px 0; height: 150px; position: fixed; left: 585px; font-size: 50px; font-family: 'Balsamiq Sans', cursive; } .modal-content{ position: fixed; width: 600px; height: 600px; bottom: 18%; left: 36%; } /* Add Animation */ .modal-content, #caption { -webkit-animation-name: zoom; -webkit-animation-duration: 0.6s; animation-name: zoom; animation-duration: 0.6s; } @-webkit-keyframes zoom { from {-webkit-transform:scale(0)} to {-webkit-transform:scale(1)} } @keyframes zoom { from {transform:scale(0)} to {transform:scale(1)} } /* The Close Button */ .close { position: absolute; top: 15px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; transition: 0.3s; } .close:hover, .close:focus { color: #bbb; text-decoration: none; cursor: pointer; } /* 100% Image Width on Smaller Screens */ @media only screen and (max-width: 700px){ .modal-content { width: 100%; } } </style> <script> // Get the modal var modal = document.getElementById('myModal'); // Get the image and insert it inside the modal - use its "alt" text as a caption var img = document.getElementById("myImg1"); var modalImg = document.getElementById("img01"); var captionText = document.getElementById("caption"); img.onclick = function(){ modal.style.display = "block"; modalImg.src = this.src; captionText.innerHTML = this.alt; } var modal = document.getElementById('myModal'); // Get the image and insert it inside the modal - use its "alt" text as a caption var img = document.getElementById("myImg2"); var modalImg = document.getElementById("img01"); var captionText = document.getElementById("caption"); img.onclick = function(){ modal.style.display = "flex"; modalImg.src = this.src; captionText.innerHTML = this.alt; } var img = document.getElementById("myImg3"); var modalImg = document.getElementById("img01"); var captionText = document.getElementById("caption"); img.onclick = function(){ modal.style.display = "block"; modalImg.src = this.src; captionText.innerHTML = this.alt; } var img = document.getElementById("myImg4"); var modalImg = document.getElementById("img01"); var captionText = document.getElementById("caption"); img.onclick = function(){ modal.style.display = "block"; modalImg.src = this.src; captionText.innerHTML = this.alt; } var img = document.getElementById("myImg5"); var modalImg = document.getElementById("img01"); var captionText = document.getElementById("caption"); img.onclick = function(){ modal.style.display = "block"; modalImg.src = this.src; captionText.innerHTML = this.alt; } var img = document.getElementById("myImg6"); var modalImg = document.getElementById("img01"); var captionText = document.getElementById("caption"); img.onclick = function(){ modal.style.display = "block"; modalImg.src = this.src; captionText.innerHTML = this.alt; } var img = document.getElementById("myImg7"); var modalImg = document.getElementById("img01"); var captionText = document.getElementById("caption"); img.onclick = function(){ modal.style.display = "block"; modalImg.src = this.src; captionText.innerHTML = this.alt; } var img = document.getElementById("myImg8"); var modalImg = document.getElementById("img01"); var captionText = document.getElementById("caption"); img.onclick = function(){ modal.style.display = "block"; modalImg.src = this.src; captionText.innerHTML = this.alt; } var img = document.getElementById("myImg9"); var modalImg = document.getElementById("img01"); var captionText = document.getElementById("caption"); img.onclick = function(){ modal.style.display = "block"; modalImg.src = this.src; captionText.innerHTML = this.alt; } var img = document.getElementById("myImg10"); var modalImg = document.getElementById("img01"); var captionText = document.getElementById("caption"); img.onclick = function(){ modal.style.display = "block"; modalImg.src = this.src; captionText.innerHTML = this.alt; } // Get the <span> element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks on <span> (x), close the modal span.onclick = function() { modal.style.display = "none"; } </script>