Dropdown
How do I make an dropdown?
What is a dropdown? How do you make a dropdown? This script and codes were developed by Ivan Sakoman on 12 June 2022, Sunday.
Dropdown - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Dropdown</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="dropdown"> <div class="dropdown-label">ovdje je neki tekst</div> <ul class="dropdown-list"> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> </ul>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Dropdown - Script Codes CSS Codes
.dropdown { overflow: hidden; width: 250px;
}
.dropdown .dropdown-label { position: relateve; z-index: 1; width: 250px; padding: 10px; border: 1px solid coral; border-radius: 5px; box-sizing: border-box; cursor: pointer; background-color: white;
}
.dropdown .dropdown-list { position: relative; background-color: rgba(45, 145, 87, 0.5); width: 250px; height: 100%; max-height: 155px; transition: all .2s ease-out; overflow-Y: scroll; margin: 0; list-style: none; -webkit-padding-start: 0; padding-right: 17px; transform: translate3d(0, -185px, 0); z-index: -1; border-radius: 5px;
}
.dropdown .dropdown-list li { padding: 5px 10px 5px 10px; width: 250px; box-sizing: border-box;
}
.dropdown .dropdown-list li:hover { background-color: rgba(45, 145, 87, 0.8);
}
.dropdown .dropdown-list.active { transform: translate3d(0, 0, 0);
}
Dropdown - Script Codes JS Codes
$(document).ready(function(){ $('.dropdown-label').click(function(){ $('.dropdown-list').toggleClass('active'); });
});
Developer | Ivan Sakoman |
Username | ssaakkaa |
Uploaded | June 12, 2022 |
Rating | 3 |
Size | 2,457 Kb |
Views | 58,696 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Colorful Apple logo | 3,176 Kb |
CSS tutorial | 6,187 Kb |
3D flipping card | 2,238 Kb |
Dropdown | 2,457 Kb |
Form elements | 4,578 Kb |
R2-D2 | 5,171 Kb |
Bootstrap example | 2,716 Kb |
Dubble header idea | 1,543 Kb |
BB-8 CSS | 5,002 Kb |
Bootstrap header | 1,872 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Zip Button test | Lje7462 | 1,932 Kb |
Material Design-Layout-Principles Practice | Fraina | 2,331 Kb |
Basic HTML5 Structure | YuvarajTana | 1,289 Kb |
Isometric css island | Xaddict | 2,950 Kb |
Hexagons | Ashmind | 4,360 Kb |
A Pen by Alex Bergin | Abergin | 3,347 Kb |
Tail rose iris lined | Kbrtrm | 1,846 Kb |
A cube | KyleDavidE | 18,627 Kb |
Flex Chart | James_zedd | 4,111 Kb |
A Pen by Michael Parenteau | Michaelparenteau | 2,133 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!