html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Valentine's Day Proposal</title>
</head>
<body>
<div class="container">
<h1>💖 The Valentine's Day Proposal! 💖</h1>
<p>Would you like to accept this amazing opportunity to share love and joy?</p>
<button class="yes-button" id="yesButton">YES, I LOVE IT! 💕</button>
<button class="no-button" id="noButton">NO, THANK YOU! 💔</button>
<p class="additional-text" id="additionalText"></p>
</div>
<script>
window.addEventListener('load', function() {
const yesButton = document.getElementById('yesButton');
const noButton = document.getElementById('noButton');
const container = document.querySelector('.container');
const additionalText = document.getElementById('additionalText');
yesButton.addEventListener('click', () => {
alert('Yay! You have accepted the proposal! Love is in the air! 💖');
});
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #ffebee; /* Light pink background */
font-family: 'Arial', sans-serif;
color: #d50000; /* Dark red text */
}
.container {
text-align: center;
background: white;
padding: 30px;
border-radius: 15px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
border: 2px solid #d50000; /* Dark red border */
}
h1 {
font-family: 'Cursive', sans-serif;
color: #d50000; /* Dark red title */
}
button {
padding: 10px 20px;
margin: 10px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 18px;
Enter to Rename, Shift+Enter to Preview
js
js
1
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Запуск