-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdropdownimage.html
More file actions
35 lines (34 loc) · 899 Bytes
/
Copy pathdropdownimage.html
File metadata and controls
35 lines (34 loc) · 899 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Drop down image</title>
<style>
/*Idea behind this is the same hide the image first and than ono hover display block the image with another same image and show that in block*/
.imageone {
width: 100px;
height: 100px;
background-color: lightcoral;
}
.imagetwo {
display: none;
width: 300px;
height: 300px;
}
.expand {
}
.expand:hover .imagetwo {
display: block;
}
</style>
</head>
<body>
<div class="expand">
<img class="imageone" src="images/imageFive.png" alt="imagefive" />
<div>
<img class="imagetwo" src="images/imagefive.png" alt="image five" />
</div>
</div>
</body>
</html>