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 |
OsijekFrontendSVG lesson2 | 3,708 Kb |
Ribon label | 2,254 Kb |
OsijekFrontendSVG lesson1 | 2,167 Kb |
Responsive header | 6,531 Kb |
OnHover transition | 1,674 Kb |
Form elements | 4,578 Kb |
BB-8 CSS | 5,002 Kb |
CSS work desk | 6,139 Kb |
CSS tutorial | 6,187 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 |
CMP5-Opdracht15 | SannevanGastel | 2,733 Kb |
Yuliya v krylova | Rafszul | 37,351 Kb |
Bootstrap example | Ssaakkaa | 2,716 Kb |
CSS Grid Overlay | Cliffpyles | 3,090 Kb |
Typefaces with descriptions | Megandoty | 2,944 Kb |
Sitemap generator for Sharepoint | Gyusza | 2,518 Kb |
GLSL Hills | Ykob | 6,991 Kb |
RPG Style Text Dialogue | Odylic | 2,635 Kb |
Plotting Points with D3.js | Laurakelly | 31,996 Kb |
SVG Hover Animations | Kjbrum | 10,557 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!