Open and slide out content

Developer
Size
3,829 Kb
Views
10,120

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 Previews

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");
});
Open and slide out content - Script Codes
Open and slide out content - Script Codes
Home Page Home
Developer Jeremias Erbs
Username badabam
Uploaded December 09, 2022
Rating 3
Size 3,829 Kb
Views 10,120
Do you need developer help for Open and slide out content?

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!

Jeremias Erbs (badabam) Script Codes
Create amazing art & images 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!