File tree Expand file tree Collapse file tree 2 files changed +73
-0
lines changed
CSS Animations/Projects/animated-nav-bar Expand file tree Collapse file tree 2 files changed +73
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+
4
+ < head >
5
+ < meta charset ="UTF-8 ">
6
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7
+ < title > Animated Nav Bar </ title >
8
+ < link rel ="stylesheet " href ="style.css ">
9
+ </ head >
10
+
11
+ < body >
12
+ < header >
13
+ < div class ="navbar ">
14
+ < ul >
15
+ < li > Logo</ li >
16
+ < li > < a href ="# "> Home</ a > </ li >
17
+ < li > < a href ="# "> Forum</ a > </ li >
18
+ < li > < a href ="# "> Login</ a > </ li >
19
+ < li > < a href ="# "> Contact</ a > </ li >
20
+
21
+ </ ul >
22
+ </ div >
23
+ </ header >
24
+ </ body >
25
+
26
+ </ html >
Original file line number Diff line number Diff line change
1
+ * {
2
+ margin : 0 ;
3
+ padding : 0 ;
4
+ box-sizing : border-box;
5
+ }
6
+ .navbar {
7
+ background-color : # 000000 ;
8
+ color : whitesmoke;
9
+ width : 100% ;
10
+ }
11
+ .navbar ul {
12
+ list-style : none;
13
+ display : flex;
14
+ align-items : center;
15
+ justify-content : flex-end;
16
+ height : 3em ;
17
+ }
18
+ .navbar ul li {
19
+ padding-right : 2em ;
20
+ }
21
+ .navbar ul li : first-child {
22
+ font-size : 2em ;
23
+ margin-right : auto;
24
+ margin-left : 2em ;
25
+ }
26
+ .navbar ul li a {
27
+ font-size : 18px ;
28
+ text-decoration : none;
29
+ color : wheat;
30
+ position : relative;
31
+ }
32
+ .navbar ul li a ::after {
33
+ content : "" ;
34
+ position : absolute;
35
+ display : block;
36
+ width : 0% ;
37
+ height : 0.2em ;
38
+ bottom : -0.5em ;
39
+ background-color : tomato;
40
+ transition : all 250ms ease-in-out;
41
+ }
42
+ .navbar ul li a : hover ::after {
43
+ width : 100% ;
44
+ }
45
+ .navbar ul li a : hover {
46
+ color : hotpink;
47
+ }
You can’t perform that action at this time.
0 commit comments