html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Friend</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<h1>Become Friends!</h1>
<button id="friendButton">Click to Become Friends</button>
<p id="message" class="hidden"></p>
</div>
<div id="note"><p>let's be friends and we can together and make wonderfull memories'</p></div>
<script src="script.js"></script>
</body>
</html>
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 {
font-family: 'Arial', sans-serif;
background: linear-gradient(100deg, #6a11cb, #2575fc);
margin: 0;
padding: 20px;
}
.container {
max-width: 400px;
margin: auto;
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
text-align: center;
transition: transform 0.2s;
}
.container:hover {
transform: scale(1.02);
}
h1 {
margin-bottom: 20px;
color: #343a40;
}
button {
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('friendButton').addEventListener('click', function() {
const message = document.getElementById('message');
message.textContent = "You have become a friend!";
message.classList.remove('hidden');
});
});
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Запуск