|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="zh-TW"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <title>Sugar Honey Ice Tea</title> |
| 6 | + <style> |
| 7 | + body { |
| 8 | + display: flex; |
| 9 | + flex-direction: column; |
| 10 | + align-items: center; |
| 11 | + justify-content: center; |
| 12 | + height: 100vh; |
| 13 | + margin: 0; |
| 14 | + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; |
| 15 | + background-color: #fdf6e3; |
| 16 | + } |
| 17 | + #message { font-size: 32px; color: #333; margin-bottom: 30px; } |
| 18 | + |
| 19 | + /* 美化後的按鈕樣式 */ |
| 20 | + .btn-yes { |
| 21 | + padding: 15px 40px; |
| 22 | + font-size: 20px; |
| 23 | + font-weight: bold; |
| 24 | + color: white; |
| 25 | + background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%); |
| 26 | + border: none; |
| 27 | + border-radius: 50px; /* 圓潤外觀 */ |
| 28 | + cursor: pointer; |
| 29 | + box-shadow: 0 4px 15px rgba(0,0,0,0.2); |
| 30 | + transition: all 0.3s ease; |
| 31 | + } |
| 32 | + |
| 33 | + .btn-yes:hover { |
| 34 | + transform: scale(1.05); /* 滑鼠懸停時微放大 */ |
| 35 | + box-shadow: 0 6px 20px rgba(0,0,0,0.3); |
| 36 | + filter: brightness(1.1); |
| 37 | + } |
| 38 | + |
| 39 | + .btn-yes:active { |
| 40 | + transform: scale(0.98); |
| 41 | + } |
| 42 | + </style> |
| 43 | +</head> |
| 44 | +<body> |
| 45 | + |
| 46 | + <div id="content"> |
| 47 | + <h1 id="message">Do you want to drink SUGAR HONEY ICE TEA?</h1> |
| 48 | + <button id="yesBtn" class="btn-yes">Yes</button> |
| 49 | + </div> |
| 50 | + |
| 51 | + <iframe id="musicPlayer" width="0" height="0" |
| 52 | + src="https://www.youtube.com/embed/naoGk-Zjc1s?autoplay=0" |
| 53 | + frameborder="0" allow="autoplay"></iframe> |
| 54 | + |
| 55 | + <script> |
| 56 | + const btn = document.getElementById('yesBtn'); |
| 57 | + const message = document.getElementById('message'); |
| 58 | + const player = document.getElementById('musicPlayer'); |
| 59 | + |
| 60 | + btn.addEventListener('click', function() { |
| 61 | + message.innerText = "Thank u!"; |
| 62 | + btn.style.display = 'none'; |
| 63 | + player.src = "https://www.youtube.com/embed/naoGk-Zjc1s?autoplay=1"; |
| 64 | + }); |
| 65 | + </script> |
| 66 | + |
| 67 | +</body> |
| 68 | +</html> |
0 commit comments