CSS dropdowns
How do I make an css dropdowns?
This is a CSS solution for hoverable drop-down boxes. Copy / content is hidden until the icon is hovered. Should work up to IE7, but the transitions will break in IE8 (functionality will remain though). . What is a css dropdowns? How do you make a css dropdowns? This script and codes were developed by Brian on 22 November 2022, Tuesday.
CSS dropdowns - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS dropdowns</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <main> <div class="dropdown-box box-1"> <div class="content"> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magnam, temporibus tempore eaque modi ipsa dicta alias inventore voluptate consectetur dolor. </p> <a href="#">cta here</a> </div> </div> <div class="dropdown-box icon-right box-2"> <div class="content"> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magnam, temporibus tempore eaque modi ipsa dicta alias inventore voluptate consectetur dolor. </p> <a href="#">cta here</a> </div> </div>
</main>
</body>
</html>
CSS dropdowns - Script Codes CSS Codes
main { width: 400px; height: 300px; position: relative; font-family: arial, helvetica, sans-serif; background: lightblue; background: url('http://placebear.com/g/400/300') no-repeat; border: 2px solid gray; margin: 20px auto;
}
.dropdown-box { position: absolute; padding: 0 20px; border: 0 solid transparent; border-radius: 5px; background: #fff; background: rgba(255, 255, 255, 0.8); -webkit-transition: padding .3s; transition: padding .3s;
}
.dropdown-box a { text-transform: uppercase; display: block; margin-top: 5px; font-weight: 800; color: #666;
}
.dropdown-box:after { content: "+"; position: absolute; top: -15px; left: -15px; font-family: arial, helvetica, sans-serif; font-size: 2.4em; font-weight: 800; color: #c7c8ca; background: #fff; border: 1px solid #c7c8ca; border-radius: 50%; padding: 1px 8px; -webkit-transition: .3s; transition: .3s;
}
.dropdown-box .content { width: 150px; height: 0; position: relative; overflow: hidden; -webkit-transition: .3s; transition: .3s;
}
.dropdown-box .content a:hover { color: #000;
}
.dropdown-box:hover { padding: 20px; border: 1px solid #c7c8ca; margin: -1px 0 0 -1px; z-index: 100;
}
.dropdown-box:hover:after { color: #666;
}
.dropdown-box:hover .content { height: 150px;
}
.icon-right::after { left: 165px;
}
.box-1 { top: 120px; left: 100px;
}
.box-2 { top: 50px; left: 190px;
}
Developer | Brian |
Username | brian-baum |
Uploaded | November 22, 2022 |
Rating | 3 |
Size | 3,146 Kb |
Views | 10,120 |
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 |
ReactJS Image Carousel | 5,932 Kb |
JQuery exercise | 3,780 Kb |
Smooth Scrolling in ReactJS | 4,005 Kb |
Responsive demo page | 5,664 Kb |
ReactJS Accessible Accordion Panel | 5,767 Kb |
JQuery countdown plugin | 4,460 Kb |
AngularJS contact list | 4,052 Kb |
JQuery hash nav plugin | 5,306 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 |
Simple Weather App | Cmwebby | 0 Kb |
Expert Help | SinceSidSlid | 4,064 Kb |
12 DAYS OF XMAS | Proto78 | 2,313 Kb |
CSS3 Butterfly | Timohausmann | 3,430 Kb |
Vue Transition | Chenming142 | 4,561 Kb |
DevCamp 2014 - Denver Public Library | See8ch | 5,033 Kb |
A Pen by Matt Popovich | Mpopv | 3,349 Kb |
Reading Grid | Tappily | 4,306 Kb |
Infractions - Attitude | Kylie_Joseph | 7,672 Kb |
Multicolumns 2 | Raphaelgoetter | 1,857 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!