1- /* Add your css for dropdowns */
1+ /* Add your css for dropdowns */
2+
3+
4+ * {
5+ padding : 0 ;
6+ margin : 0 ;
7+ font-family : 'Lato' , sans-serif;
8+ box-sizing : border-box;
9+ }
10+ .float-right {
11+ float : right;
12+ }
13+ .fa {
14+ font-size : .8em ;
15+ line-height : 22px !important ;
16+ }
17+ dropdown {
18+ display : inline-block;
19+ margin : 20px 50px ;
20+ }
21+ dropdown label , dropdown ul li {
22+ display : block;
23+ width : 200px ;
24+ background : # ECF0F1 ;
25+ padding : 15px 20px ;
26+ }
27+ dropdown label : hover , dropdown ul li : hover {
28+ background : # 1ABC9C ;
29+ color : white;
30+ cursor : pointer;
31+ }
32+ dropdown label {
33+ color : # 1ABC9C ;
34+ border-left : 4px solid # 1ABC9C ;
35+ border-radius : 0 5px 0 0 ;
36+ position : relative;
37+ z-index : 2 ;
38+ }
39+ dropdown input {
40+ display : none;
41+ }
42+ dropdown input ~ ul {
43+ position : relative;
44+ visibility : hidden;
45+ opacity : 0 ;
46+ top : -20px ;
47+ z-index : 1 ;
48+ }
49+ dropdown input : checked + label {
50+ background : # 1ABC9C ;
51+ color : white;
52+ }
53+
54+ dropdown input : checked ~ ul {
55+ visibility : visible;
56+ opacity : 1 ;
57+ top : 0 ;
58+ }
59+ $color s: # E74C3C , # 0072B5, # 2C3E50;
60+
61+ @for $i from 1 through length($color s) {
62+ dropdown ul li : nth-child (# {$i}) {
63+ border-left : 4px solid nth ($color s, $i);
64+ .fa {
65+ color : nth ($color s, $i);
66+ }
67+ & : hover {
68+ background : nth ($color s, $i);
69+ color : white;
70+ .fa {
71+ color : white;
72+ }
73+ }
74+ }
75+ }
76+
77+ .animate {
78+ -webkit-transition : all .3s ;
79+ -moz-transition : all .3s ;
80+ -ms-transition : all .3s ;
81+ -ms-transition : all .3s ;
82+ transition : all .3s ;
83+ backface-visibility : hidden;
84+ -webkit-backface-visibility : hidden; /* Chrome and Safari */
85+ -moz-backface-visibility : hidden; /* Firefox */
86+ -ms-backface-visibility : hidden; /* Internet Explorer */
87+ }
0 commit comments