Dropdown

Developer
Size
2,457 Kb
Views
58,696

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 Previews

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'); });
});
Dropdown - Script Codes
Dropdown - Script Codes
Home Page Home
Developer Ivan Sakoman
Username ssaakkaa
Uploaded June 12, 2022
Rating 3
Size 2,457 Kb
Views 58,696
Do you need developer help for Dropdown?

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!

Ivan Sakoman (ssaakkaa) Script Codes
Create amazing captions with AI!

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!