-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
50 lines (46 loc) · 1.18 KB
/
index.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Jaunimas gali</title>
<style>
.my_wrapper {
height: 100vh;
display: flex;
align-items: center;
text-align: center;
justify-content: center;
flex-direction: column;
}
.my_button {
background: #ff3454;
color: #ffffff;
padding: 20px 40px;
font-size: 20px;
border: 0;
border-radius: 20px;
transition: transform .6s;
margin: 10px;
}
.my_button:hover {
transform: scale(2) rotate(360deg);
}
</style>
</head>
<body>
<div class="my_wrapper">
<h1>Laba diena</h1>
<h2>Kaip laikotes?</h2>
<p>
<button id="mygtukas" class="my_button">Paspausk mane</button>
</p>
</div>
<script>
let my_button = document.querySelector("#mygtukas");
let body = document.querySelector("body");
my_button.addEventListener("click", function() {
body.style.backgroundColor = '#'+(Math.random()*0xFFFFFF<<0).toString(16);
});
</script>
</body>
</html>