-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
46 lines (43 loc) · 1.34 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
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Rider by Soul
</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container" id="bike">
<nav>
<img src="logo.png" class="logo">
<a href="#" class="btn">Test Drive</a>
</nav>
<div class="content">
<h2>The BMW</h2>
<h1>G 310 R</h1>
<p>The strength</p>
<h3>Choose your colour</h3>
<div class="colour-select">
<div id="red"></div>
<div id="blue"></div>
<div id="black"></div>
</div>
</div>
</div>
<script>
let redBtn = document.getElementById("red");
let blueBtn = document.getElementById("blue");
let blackBtn = document.getElementById("black");
let bike = document.getElementById("bike");
redBtn.onclick = function(){
bike.style.backgroundImage = "url(BMW1.png)";
}
blueBtn.onclick = function(){
bike.style.backgroundImage = "url(BMW2.png)";
}
blackBtn.onclick = function(){
bike.style.backgroundImage = "url(BMW3.png)";
}
</script>
</body>
</html>