-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask4CSS.html
More file actions
65 lines (56 loc) · 1.71 KB
/
task4CSS.html
File metadata and controls
65 lines (56 loc) · 1.71 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
h1{
text-align: center;
}
.container {
margin-top: 40px;
}
ul,
li {
padding: 0;
padding-bottom: 50px;
list-style: none;
width: 50px;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
transition: transform 0.3s ease, width 0.3s ease, opacity 0.3s ease;
opacity: 1;
cursor: pointer;
position: relative;
}
li span {
position: absolute;
color: rgb(255, 255, 255);
padding: 5px;
opacity: 0;
white-space:nowrap;
transition: opacity 0.3s;
}
li:hover {
width: 75px;
transform: translateX(10px);
opacity: 0.9;
}
li:hover span {
opacity: 1;
}
</style>
<title>Nav hover</title>
</head>
<body>
<div><h1>Hoverable Sidenav Buttons</h1></div>
<div class="container">
<nav>
<ul>
<li style="background-color: rgb(58, 159, 58);"><a href="index.html"><span>Home</span></a></li><br>
<li style="background-color: rgb(16, 176, 245);"><a href="index.html"><span>Java</span></a></li><br>
<li style="background-color: rgb(247, 61, 61);"><a href="index.html"><span>CSS</span></a></li><br>
<li style="background-color: rgb(96, 96, 96);"><a href="index.html"><span>Bootstrap</span></a></li><br>
</ul>
</body>
</html>