CSS Animated Drop Down Menus

Size
4,117 Kb
Views
26,312

How do I make an css animated drop down menus?

More flips and spins than Tony Hawk in his prime.. What is a css animated drop down menus? How do you make a css animated drop down menus? This script and codes were developed by Joseph Martucci on 25 October 2022, Tuesday.

CSS Animated Drop Down Menus Previews

CSS Animated Drop Down Menus - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Animated Drop Down Menus</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <link href='https://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>
<h1>Roll 'em up menus</h1>
<section class="x-out expanded"> <dt class="open">Things on a list</dt> <dd>Here's some things.</dd> <dd>In a list.</dd> <dd>The list is hidden!</dd> <dd>But not very hard</dd> <dd>To find.</dd>
</section>
<section class="blinds"> <dt>Window Blinds</dt> <dd>Here's some things.</dd> <dd>In a list.</dd> <dd>The list is hidden!</dd> <dd>But not that hard</dd> <dd>To find.</dd>
</section>
<section class="hash"> <dt>X Marks the Spot</dt> <dd>Here's some things.</dd> <dd>In a list.</dd> <dd>The list is hidden!</dd> <dd>But not very hard</dd> <dd>To find.</dd>
</section>
<section class="flip"> <dt>Flip 'em</dt> <dd>Here's some things.</dd> <dd>In a list.</dd> <dd>The list is hidden!</dd> <dd>But not that hard</dd> <dd>To find.</dd>
</section>
<section class="slide"> <dt>Crossover</dt> <dd>Here's some things.</dd> <dd>In a list.</dd> <dd>The list is hidden!</dd> <dd>But not very hard</dd> <dd>To find.</dd>
</section>
<section class="lightsabers"> <dt>Techno Show</dt> <dd>This list is different.</dd> <dd>I bet you feel good.</dd> <dd>About clicking all of them.</dd>
</section> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

CSS Animated Drop Down Menus - Script Codes CSS Codes

html, body { height: 100%;
}
body { background: linear-gradient(transparent, rgba(0, 0, 0, 0.3)), #BD4932; background-repeat: no-repeat; font-family: 'Roboto', sans-serif;
}
h1 { padding: 0 20px; color: #FFFFFF; text-shadow: 1px 1px #105B63, 2px 2px #105B63, 3px 3px #105B63, 4px 4px #105B63; text-transform: uppercase; text-align: center;
}
section { -webkit-transition: all 0.3s ease-in-out; -moz-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out; float: left; max-height: 30px; overflow: hidden; width: 200px; margin: 20px; box-shadow: 0 0 5px #000;
}
section.expanded { max-height: 200px;
}
dt { text-transform: uppercase; font-weight: 700; color: #FFF; background: #105B63; padding: 5px 10px; position: relative; cursor: pointer;
}
dd { background: #FFF; color: #105B63; margin: 0; padding: 5px 15px;
}
.x-out dt::after, .x-out dt::before { -webkit-transition: all 0.4s linear; -moz-transition: all 0.4s linear; transition: all 0.4s linear; content: ""; width: 2px; height: 15px; background: #FFD34E; position: absolute; right: 10px; top: 7.5px;
}
.x-out dt::after, .x-out dt::before { -webkit-transition: all 0.4s linear; -moz-transition: all 0.4s linear; transition: all 0.4s linear; content: ""; width: 2px; height: 15px; background: #FFD34E; position: absolute; right: 10px; top: 7.5px;
}
.x-out dt::after { -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg);
}
.x-out dt::before { -webkit-transform: translateX(-10px) rotate(-45deg); -moz-transform: translateX(-10px) rotate(-45deg); -ms-transform: translateX(-10px) rotate(-45deg); -o-transform: translateX(-10px) rotate(-45deg); transform: translateX(-10px) rotate(-45deg);
}
.x-out dt.open::before { -webkit-transform: translateX(-5px) rotate(-45deg); -moz-transform: translateX(-5px) rotate(-45deg); -ms-transform: translateX(-5px) rotate(-45deg); -o-transform: translateX(-5px) rotate(-45deg); transform: translateX(-5px) rotate(-45deg);
}
.x-out dt.open::after { -webkit-transform: translateX(-5px) rotate(45deg); -moz-transform: translateX(-5px) rotate(45deg); -ms-transform: translateX(-5px) rotate(45deg); -o-transform: translateX(-5px) rotate(45deg); transform: translateX(-5px) rotate(45deg);
}
.blinds dt::after, .blinds dt::before { -webkit-transition: all 0.4s linear; -moz-transition: all 0.4s linear; transition: all 0.4s linear; content: ""; width: 15px; height: 2px; background: #FFD34E; position: absolute; right: 10px; top: 10px;
}
.blinds dt::after { box-shadow: 0 4px #FFD34E, 0 8px #FFD34E;
}
.blinds dt.open::after { box-shadow: none;
}
.hash dt::after, .hash dt::before { -webkit-transition: all 0.4s linear; -moz-transition: all 0.4s linear; transition: all 0.4s linear; content: ""; width: 15px; height: 2px; background: #FFD34E; position: absolute; right: 10px; top: 8px;
}
.hash dt::after { box-shadow: 0 14px #b48700;
}
.hash dt::before { background: #b48700; -webkit-transform-origin: center center; -moz-transform-origin: center center; -ms-transform-origin: center center; -o-transform-origin: center center; transform-origin: center center; -webkit-transform: translateX(7.5px) translateY(7px) rotate(90deg); -moz-transform: translateX(7.5px) translateY(7px) rotate(90deg); -ms-transform: translateX(7.5px) translateY(7px) rotate(90deg); -o-transform: translateX(7.5px) translateY(7px) rotate(90deg); transform: translateX(7.5px) translateY(7px) rotate(90deg); box-shadow: 0 15px #FFD34E;
}
.hash dt.open::after { -webkit-transform: translateY(4px) translateX(0) rotate(-45deg); -moz-transform: translateY(4px) translateX(0) rotate(-45deg); -ms-transform: translateY(4px) translateX(0) rotate(-45deg); -o-transform: translateY(4px) translateX(0) rotate(-45deg); transform: translateY(4px) translateX(0) rotate(-45deg); box-shadow: 0 3px #FFD34E;
}
.hash dt.open::before { -webkit-transform: translateY(4px) translateX(2px) rotate(45deg); -moz-transform: translateY(4px) translateX(2px) rotate(45deg); -ms-transform: translateY(4px) translateX(2px) rotate(45deg); -o-transform: translateY(4px) translateX(2px) rotate(45deg); transform: translateY(4px) translateX(2px) rotate(45deg); background: #FFD34E; box-shadow: 0 3px #FFD34E;
}
.flip dt::after, .flip dt::before { -webkit-transition: all 0.4s linear; -moz-transition: all 0.4s linear; transition: all 0.4s linear; content: ""; width: 2px; height: 15px; background: #FFD34E; position: absolute; right: 10px; top: 7.5px;
}
.flip dt::after, .flip dt::before { -webkit-transition: all 0.4s linear; -moz-transition: all 0.4s linear; transition: all 0.4s linear; content: ""; width: 2px; height: 15px; background: #FFD34E; position: absolute; right: 10px; top: 7.5px;
}
.flip dt::after { -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg);
}
.flip dt::before { -webkit-transform: translateX(-10px) rotate(-45deg); -moz-transform: translateX(-10px) rotate(-45deg); -ms-transform: translateX(-10px) rotate(-45deg); -o-transform: translateX(-10px) rotate(-45deg); transform: translateX(-10px) rotate(-45deg);
}
.flip dt.open::before { -webkit-transform: rotate(-225deg); -moz-transform: rotate(-225deg); -ms-transform: rotate(-225deg); -o-transform: rotate(-225deg); transform: rotate(-225deg);
}
.flip dt.open::after { -webkit-transform: translateX(-10px) rotate(225deg); -moz-transform: translateX(-10px) rotate(225deg); -ms-transform: translateX(-10px) rotate(225deg); -o-transform: translateX(-10px) rotate(225deg); transform: translateX(-10px) rotate(225deg);
}
.slide dt::after, .slide dt::before { -webkit-transition: all 0.4s linear; -moz-transition: all 0.4s linear; transition: all 0.4s linear; content: ""; width: 2px; height: 15px; background: #FFD34E; position: absolute; right: 10px; top: 7.5px;
}
.slide dt::after, .slide dt::before { -webkit-transition: all 0.4s linear; -moz-transition: all 0.4s linear; transition: all 0.4s linear; content: ""; width: 2px; height: 15px; background: #FFD34E; position: absolute; right: 10px; top: 7.5px;
}
.slide dt::after { -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg);
}
.slide dt::before { -webkit-transform: translateX(-10px) rotate(-45deg); -moz-transform: translateX(-10px) rotate(-45deg); -ms-transform: translateX(-10px) rotate(-45deg); -o-transform: translateX(-10px) rotate(-45deg); transform: translateX(-10px) rotate(-45deg);
}
.slide dt.open::before { -webkit-transform: rotate(-760deg); -moz-transform: rotate(-760deg); -ms-transform: rotate(-760deg); -o-transform: rotate(-760deg); transform: rotate(-760deg);
}
.slide dt.open::after { -webkit-transform: translateX(-10px) rotate(760deg); -moz-transform: translateX(-10px) rotate(760deg); -ms-transform: translateX(-10px) rotate(760deg); -o-transform: translateX(-10px) rotate(760deg); transform: translateX(-10px) rotate(760deg);
}
.lightsabers dt::after, .lightsabers dt::before { -webkit-transition: all 0.4s linear; -moz-transition: all 0.4s linear; transition: all 0.4s linear; content: ""; width: 2px; height: 15px; background: #FFD34E; position: absolute; right: 10px; top: 7.5px;
}
.lightsabers dt::after, .lightsabers dt::before { box-shadow: 0 0 6px #FFD34E; -webkit-transition: all 0.4s linear; -moz-transition: all 0.4s linear; transition: all 0.4s linear; content: ""; width: 2px; height: 15px; background: #FFD34E; position: absolute; right: 10px; top: 7.5px;
}
.lightsabers dt::after { -webkit-transform: rotate(3120deg); -moz-transform: rotate(3120deg); -ms-transform: rotate(3120deg); -o-transform: rotate(3120deg); transform: rotate(3120deg);
}
.lightsabers dt::before { -webkit-transform: rotate(-3120deg); -moz-transform: rotate(-3120deg); -ms-transform: rotate(-3120deg); -o-transform: rotate(-3120deg); transform: rotate(-3120deg); right: 20px;
}
.lightsabers dt.open::before { -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg); -webkit-filter: hue-rotate(720deg); filter: hue-rotate(720deg); right: 20px;
}
.lightsabers dt.open::after { -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-filter: hue-rotate(720deg); filter: hue-rotate(720deg);
}

CSS Animated Drop Down Menus - Script Codes JS Codes

var $dts = $('dt');
$dts.on('click', function(){ $(this).toggleClass('open'); $(this).parent('section').toggleClass('expanded');
});
CSS Animated Drop Down Menus - Script Codes
CSS Animated Drop Down Menus - Script Codes
Home Page Home
Developer Joseph Martucci
Username jjmartucci
Uploaded October 25, 2022
Rating 4.5
Size 4,117 Kb
Views 26,312
Do you need developer help for CSS Animated Drop Down Menus?

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!

Joseph Martucci (jjmartucci) Script Codes
Create amazing love letters 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!