Open and slide out content
How do I make an open and slide out content?
What is a open and slide out content? How do you make a open and slide out content? This script and codes were developed by Jeremias Erbs on 09 December 2022, Friday.
Open and slide out content - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Open and slide out content</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ body { padding: 20px; font-family: "Helvetica Neue", Helvetica, Arial, sans;
}
.container { position: relative; margin: 0 auto; width: 300px; perspective: 400px; transform-style: preserve-3d;
}
.mask { overflow: hidden;
}
.trigger { background-color: #ccc; background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.5) 10px, rgba(255, 255, 255, 0.5) 20px); box-sizing: border-box; color: white; cursor: pointer; font-size: 32px; font-weight: bold; letter-spacing: 1px; line-height: 50px; position: absolute; text-align: center; text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.7); top: 0; transform-origin: top; transform: rotateY(0); vertical-align: middle; width: 100%;
}
.content { background-color: #eee; box-sizing: border-box; margin-top: -100%; padding: 10px; transition: all 0.4s ease 0.1s; border: 1px solid #ccc;
}
.trigger-in,
.trigger-out { animation: ani 0.5s ease;
}
.content-show { margin-top: 50px;
}
@keyframes ani { 0%, 100% { transform: rotateX(0deg); box-shadow: 0 0 0 rgba(0, 0, 0, 0.6); } 25%, 50%, 75% { transform: rotateX(10deg); box-shadow: 0 14px 16px rgba(0, 0, 0, 0.6); }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="container"> <div class="mask"> <div class="content">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur expedita earum modi eius recusandae facere molestiae eveniet eaque odit ipsum soluta similique. Eos odio impedit laborum excepturi fuga eius a.</div> </div> <div data-trigger class="trigger">Please click</div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Open and slide out content - Script Codes CSS Codes
body { padding: 20px; font-family: "Helvetica Neue", Helvetica, Arial, sans;
}
.container { position: relative; margin: 0 auto; width: 300px; perspective: 400px; transform-style: preserve-3d;
}
.mask { overflow: hidden;
}
.trigger { background-color: #ccc; background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.5) 10px, rgba(255, 255, 255, 0.5) 20px); box-sizing: border-box; color: white; cursor: pointer; font-size: 32px; font-weight: bold; letter-spacing: 1px; line-height: 50px; position: absolute; text-align: center; text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.7); top: 0; transform-origin: top; transform: rotateY(0); vertical-align: middle; width: 100%;
}
.content { background-color: #eee; box-sizing: border-box; margin-top: -100%; padding: 10px; transition: all 0.4s ease 0.1s; border: 1px solid #ccc;
}
.trigger-in,
.trigger-out { animation: ani 0.5s ease;
}
.content-show { margin-top: 50px;
}
@keyframes ani { 0%, 100% { transform: rotateX(0deg); box-shadow: 0 0 0 rgba(0, 0, 0, 0.6); } 25%, 50%, 75% { transform: rotateX(10deg); box-shadow: 0 14px 16px rgba(0, 0, 0, 0.6); }
}
Open and slide out content - Script Codes JS Codes
$("[data-trigger]").on("click", function() { var TRIGGERS = ["trigger-in", "trigger-out"], trigger = $(this), parent = trigger.parent(), content = parent.find(".content"), isInside = trigger.is(".trigger-in"), triggerGetter = isInside ? [].shift : [].pop; trigger.removeClass("trigger-in"); setTimeout(function() { trigger.addClass("trigger-in"); }, 0); content.toggleClass("content-show");
});
Developer | Jeremias Erbs |
Username | badabam |
Uploaded | December 09, 2022 |
Rating | 3 |
Size | 3,829 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 |
CSS3 Columns Example | 2,886 Kb |
Simple page for beginners lessons. | 3,068 Kb |
Simple icon element with any centered content | 2,880 Kb |
Button with stripe shadow | 3,602 Kb |
Working agreements | 5,333 Kb |
Word combinator | 3,432 Kb |
Circle through values in array | 1,903 Kb |
Better jQuery event handler example | 2,928 Kb |
A 1x1 transparent base64 gif. | 1,942 Kb |
Shopping cart animation | 0 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 |
Animate a paper plane along an SVG path, looking ahead | PotatoDie | 3,734 Kb |
Swiftype Lower Third | Zumwalt | 4,796 Kb |
A Pen by Andrea Verlicchi | Verlok | 2,018 Kb |
Rows with image hover effect | Amit-webdesigner | 12,875 Kb |
Header | Er40 | 1,542 Kb |
Front in Aracaju Logo Pure CSS | Shankarcabus | 2,581 Kb |
Simple Login Form | JoshBlackwood | 4,418 Kb |
Twinner Spinner II | Katydecorah | 2,974 Kb |
Apple website | Jds317 | 1,835 Kb |
CSS Google Now | Jackmoran | 3,196 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!