-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdropdowns.html
More file actions
186 lines (157 loc) · 4.75 KB
/
dropdowns.html
File metadata and controls
186 lines (157 loc) · 4.75 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!-- <link rel="stylesheet" href="./my-css/my-css.css"> -->
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a,
.btn-dropdown {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover,
.dropdown:hover,
.btn-dropdown:hover {
background-color: red;
}
li .dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 100px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #f1f1f1;
}
.dropdown:hover .dropdown-content {
display: block;
}
/* .btn-dropdown{
background-color: #4caf50;
color: white;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
.dropdown{
position: relative;
display: inline-block;
}
.dropdown-content{
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgb(0,0,0,0.2);
z-index: 2;
}
.dropdown-content a{
color: black;
text-decoration: none;
display: block;
padding: 12px 16px;
}
.dropdown:hover .dropdown-content{
display: block;
}
.dropdown:hover .btn-dropdown{
background-color: #3e8e41;
}
.dropdown-content a:hover{
background-color: #f1f1f1;
}
.dropdown .dropdown-img{
width: 100px;
}
.dropdown .dropdown-content .dropdown-content-img{
width: 300px;
}
.desc{
padding: 15px;
text-align: center;
} */
</style>
</head>
<body>
<h1>Dropdowns</h1>
<ul class="navbar">
<li>
<a href="#">Home</a>
</li>
<li>
<a href="#">News</a>
</li>
<li class="dropdown">
<a
href="#" class="btn-dropdown">
Dropdown
</a>
<div class="dropdown-content">
<a href="#">Link 1</a>
<a href="#">Link 2</a>
<a href="#">Link 3</a>
<a href="#">Link 4</a>
</div>
</li>
</ul>
<h3>Lorem ipsum dolor sit.</h3>
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Natus nesciunt perferendis eligendi in vel accusamus tempora sapiente sed, eos earum placeat rem, repellat, molestiae vero. Autem quis repellat perferendis soluta?</p>
<!-- <div class="empty"></div> -->
<!-- <div class="dropdown" style="float: left;">
<button class="btn-dropdown">sol dropdown</button>
<div class="dropdown-content">
<a href="#">Link 1</a>
<a href="#">Link 2</a>
<a href="#">Link 3</a>
<a href="#">Link 4</a>
</div>
</div>
<div class="dropdown" style="float: right;">
<button class="btn-dropdown">sağ dropdown</button>
<div class="dropdown-content">
<a href="#">Link 1</a>
<a href="#">Link 2</a>
<a href="#">Link 3</a>
<a href="#">Link 4</a>
</div>
</div>
<p style="display: inline-block;">Lorem ipsum dolor sit amet, consectetur adipisicing elit. In at repudiandae illum tempore maiores, assumenda corrupti quae autem. Vitae obcaecati qui consequatur soluta magnam, dolorum ipsam! Veritatis dignissimos ducimus adipisci.</p>
<div class="dropdown">
<img class="dropdown-img" src="https://i.ytimg.com/vi/vD1JR9jjXFE/mqdefault.jpg" alt="">
<div class="dropdown-content">
<img class="dropdown-content-img" src="https://i.ytimg.com/vi/vD1JR9jjXFE/mqdefault.jpg" alt="">
<div class="desc">Harika bir resim bence!</div>
</div>
</div> -->
<p style="margin-bottom: 2000px;"></p>
</body>
</html>