Dropdowns
Dropdown text
Сложи мишката тук!
Това е dropdown
.dropdown-basic {
display: inline-block;
}
.dropdown-content {
display: none;
background-color: #0094aa;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
padding: 12px 16px;
}
.dropdown-basic:hover .dropdown-content {
display: block;
}
Правим dropdown-content да не се показва с display: none и правим да се показва ако мишката е върху dropdown-basic
Dropdown Menu
.dropdown-basic {
display: inline-block;
}
.dropdown-content {
display: none;
background-color: #0094aa;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
padding: 12px 16px;
}
.dropdown-basic:hover .dropdown-content {
display: block;
}
.dropdown-content a {
color: black;
padding: 12px ;
display: block;
}
.drop-button {
background-color: green;
color: white;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
Напреднал Пример
- 🙂
- 😺
- 😽
- 😎
- 🤗
CSS
.dropdown {
position: relative;
width: 230px;
filter: url(#goo);
}
.dropdown__face, .dropdown__items {
background-color: #fff;
padding: 20px;
border-radius: 25px;
}
.dropdown__face {
display: block;
position: relative;
}
.dropdown__items {
margin: 0;
position: absolute;
right: 0;
top: 50%;
width: 100%;
list-style: none;
list-style-type: none;
display: flex;
justify-content: space-between;
visibility: hidden;
z-index: -1;
opacity: 0;
transition: all 0.4s cubic-bezier(0.93, 0.88, 0.1, 0.8);
}
.dropdown__items::before {
content: "";
background-color: #fff;
position: absolute;
bottom: 100%;
right: 20%;
height: 40px;
width: 20px;
}
.dropdown__arrow {
border-bottom: 2px solid #000;
border-right: 2px solid #000;
position: absolute;
top: 50%;
right: 30px;
width: 10px;
height: 10px;
transform: rotate(45deg) translateY(-50%);
transform-origin: right;
}
.dropdown input {
display: none;
}
.dropdown input:checked ~ .dropdown__items {
top: calc(100% + 25px);
visibility: visible;
opacity: 1;
}
svg {
display: none;
}