Repository navigation
Html #1851
Copy link
Copy link
Open
Description
Activity
Hi! @yahyagokmen51-ship-it I’d like to contribute and fix this issue. I noticed a few syntax and structure errors in the HTML/JS, and I can submit a corrected version. Can I go ahead and work on this?
- <title>Sana Bir Sorum Var!</title> <style> body { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; margin: 0; background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%); font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; text-align: center; overflow: hidden; }
#soru { font-size: 2.5em; margin-bottom: 40px; color: #444; text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5); z-index: 1; } #demo { /* Added style for the demo element so you can see it */ font-size: 2em; color: #00b894; margin-bottom: 20px; font-weight: bold; min-height: 1.2em; /* Prevents layout shift */ } .cevap-butonu { padding: 15px 30px; margin: 10px; font-size: 1.3em; cursor: pointer; border: 2px solid #fff; border-radius: 50px; transition: all 0.3s ease; font-weight: bold; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); z-index: 100; } #evetBtn { background-color: #00b894; color: white; } #evetBtn:hover { transform: scale(1.05); background-color: #00a082; } #hayirBtn { background-color: #ff6b6b; color: white; position: absolute; transition: transform 0.1s ease-out; } /* Simple animation for the message */ @keyframes bounceIn { 0% { transform: scale(0.3); opacity: 0; } 50% { transform: scale(1.05); } 70% { transform: scale(0.9); } 100% { transform: scale(1); opacity: 1; } } </style><div id="soru">Beni seviyor musun?</div> <!-- This is the missing element that the script looks for --> <div id="demo"></div> <div> <!-- Added onclick event to trigger the function --> <button id="evetBtn" class="cevap-butonu" onclick="myFunction()">Evet</button> <button id="hayirBtn" class="cevap-butonu">Hayır</button> </div> <!-- Script placed at the end of body so elements exist when it runs --> <script> function myFunction() { // Fixed: Added closing quote and proper string document.getElementById("demo").innerHTML = "Slm! ❤️"; // Optional: Change the question text as well document.getElementById("soru").innerHTML = "Biliyordum! 😊"; } // Optional: Make the 'No' button run away const hayirBtn = document.getElementById("hayirBtn"); hayirBtn.addEventListener("mouseover", function() { const x = Math.random() * (window.innerWidth - this.offsetWidth); const y = Math.random() * (window.innerHeight - this.offsetHeight); this.style.left = x + "px"; this.style.top = y + "px"; }); </script>
Metadata
Metadata
Assignees
Labels
No labels
Script in head tag
nbr
hihi <title>Sana Bir Sorum Var!</title> <style> body { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; margin: 0; /* Renkli Arka Plan */ background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%); font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; text-align: center; overflow: hidden; } #soru { font-size: 2.5em; margin-bottom: 40px; color: #444; text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5); z-index: 1; } #resim { /* Eğer resim kullanmak isterseniz bu kısmı açabilirsiniz */ /* margin-bottom: 30px; width: 80%; max-width: 500px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); z-index: 1; */ display: none; /* Bu örnekte resmi gizledik, isterseniz kaldırabilirsiniz */ } .cevap-butonu { padding: 15px 30px; margin: 10px; font-size: 1.3em; cursor: pointer; border: 2px solid #fff; border-radius: 50px; /* Yuvarlak butonlar */ transition: all 0.3s ease; font-weight: bold; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); z-index: 100; } #evetBtn { background-color: #00b894; /* Turkuaz/Canlı Yeşil */ color: white; } #evetBtn:hover { transform: scale(1.05); background-color: #00a082; } #hayirBtn { background-color: #ff6b6b; /* Canlı Kırmızı */ color: white; position: absolute; /* Yer değiştirme için mutlak konumlandırma */ transition: transform 0.1s ease-out; /* Hızlı hareket */ } #mesaj-alani { position: fixed; top: 0; left: 0; width: 95%; height: 100%; display: none; flex-direction: column; justify-content: center; align-items: center; background-color: rgba(255, 255, 255, 0.95); /* Yarı saydam beyaz */ z-index: 999; } #sonMesaj { font-size: 3em; color: #e84393; /* Canlı Pembe */ text-align: center; padding: 20px; border-radius: 15px; background-color: #fff; box-shadow: 0 0 30px rgba(255, 105, 180, 0.6); animation: bounceIn 1s forwards; }Hey This is my JavaScript Learning Highlight! Try yours from: https://play.google.com/store/apps/details?id=com.pkj.javascript