1+ @import url ('https://fonts.googleapis.com/css2?family=Raleway:wght@300&display=swap' );
2+
13html , body {
24 height : 100% ;
35 margin : 0 ;
6+ font-family : 'Raleway' , sans-serif;
47}
58
69header {
@@ -15,11 +18,14 @@ header {
1518# img_menu {
1619 padding : 5px ;
1720 border-radius : 7px ;
18- transition : opacity 0.3 s ease-in-out;
21+ transition : opacity 0.35 s ease-in-out;
1922 height : 32px ;
23+ z-index : 0 ;
2024}
2125
2226# boton_menu {
27+ position : absolute;
28+ z-index : 1 ;
2329 display : flex;
2430 justify-content : center;
2531 align-items : center;
@@ -39,14 +45,59 @@ header {
3945 transition : transform 0.3s ease-in-out;
4046}
4147
42- # boton_menu : hover # img_menu {
43- opacity : 0 ;
44- }
45-
46- # boton_menu : hover ::after {
48+ .hacerAnimacion ::after {
4749 transform : rotate (45deg );
4850}
4951
50- # boton_menu : hover ::before {
52+ . hacerAnimacion ::before {
5153 transform : rotate (-45deg );
52- }
54+ }
55+
56+ # nav {
57+ display : flex;
58+ flex-direction : column;
59+ position : absolute;
60+ left : 0 ;
61+ right : 0 ;
62+ top : 0 ;
63+ box-sizing : border-box;
64+ height : auto;
65+ width : 100% ;
66+ z-index : 0 ;
67+ overflow : hidden;
68+ transform : translateY (-100% );
69+ transition : transform 0.3s ease-in-out;
70+ }
71+
72+ .item_menu {
73+ display : flex;
74+ justify-content : center;
75+ align-items : center;
76+ font-size : 2em ;
77+ height : 70px ;
78+ width : 100% ;
79+ background-color : # 484848 ;
80+ text-decoration : none;
81+ text-emphasis : none;
82+ color : white;
83+ border-bottom : 1px solid white;
84+ z-index : 0 ;
85+ }
86+
87+
88+ .item_menu ::before {
89+ content : " " ;
90+ position : absolute;
91+ display : block;
92+ height : 70px ;
93+ width : 100% ;
94+ background-color : # E04545 ;
95+ transform : translateY (500px );
96+ z-index : -1 ;
97+ transition : transform 0.4s ease-in-out;
98+
99+ }
100+
101+ .item_menu : hover ::before {
102+ transform : translateY (0% );
103+ }
0 commit comments