Sidebar with smooth transition
How do I make an sidebar with smooth transition?
Sidebar with simple transition; simple, smooth and easy. What is a sidebar with smooth transition? How do you make a sidebar with smooth transition? This script and codes were developed by Antonija Simic on 28 September 2022, Wednesday.
Sidebar with smooth transition - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Sidebar with smooth transition</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <button class="btn-nav"> <div class="bar arrow-top-r"></div> <div class="bar arrow-middle-r"></div> <div class="bar arrow-bottom-r"></div>
</button>
<div class="nav-container hidden hideNav"> <ul class="nav-list"> <li class="list-item"><a href=""><i class="fa fa-gift"></i></a></li> <li class="list-item"><a href=""><i class="fa fa-moon-o"></i></a></li> <li class="list-item"><a href=""><i class="fa fa-star"></i></a></li> <li class="list-item"><a href=""><i class="fa fa-truck"></i></a></li> <li class="list-item"><a href=""><i class="fa fa-umbrella"></i></a></li> </ul>
</div>
<a href="https://codepen.io/tonkec" class="ua" target="_blank">
<i class="fa fa-user"></i></a> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Sidebar with smooth transition - Script Codes CSS Codes
html, body { height: 100%; width: 100%; margin: 0; background: #2E282A; } button { background: none; border: none; } button::-moz-focus-inner { border: 0; } :focus { outline: none; } ::-moz-focus-inner { border: 0; } .btn-nav:hover { cursor: pointer; } .btn-nav:hover .bar { background: #17BEBB; } .bar { display: block; height: 5px; width: 50px; background: #fff; margin: 10px auto; } .btn-nav { display: block; padding: 15px 0; width: 50px; position: fixed; left: 20px; margin: 0 auto; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -ms-transition: all 1s ease; -o-transition: all 1s ease; transition: all 1s ease; } .btn-nav:focus { outline: none; } .middle { margin: 0 auto; } .bar { -webkit-transition: all .7s ease; -moz-transition: all .7s ease; -ms-transition: all .7s ease; -o-transition: all .7s ease; transition: all .7s ease; } .animated { z-index: 999; } .animated .arrow-top-r { -webkit-transform: rotateZ(-45deg) translateY(11px); -moz-transform: rotateZ(-45deg) translateY(11px); -ms-transform: rotateZ(-45deg) translateY(11px); -o-transform: rotateZ(-45deg) translateY(11px); transform: rotateZ(-45deg) translateY(11px); width: 25px; } .animated .arrow-middle-r { -webkit-transform: translateX(25px); -moz-transform: translateX(25px); -ms-transform: translateX(25px); -o-transform: translateX(25px); transform: translateX(25px); } .animated .arrow-bottom-r { -webkit-transform: rotateZ(45deg) translateY(-11px); -moz-transform: rotateZ(45deg) translateY(-11px); -ms-transform: rotateZ(45deg) translateY(-11px); -o-transform: rotateZ(45deg) translateY(-11px); transform: rotateZ(45deg) translateY(-11px); width: 25px; } .nav-container { position: absolute; left: -50%; top: 0; background: #CD5334; height: 100%; width: 150px; } .nav-list { cursor: pointer; list-style-type: none; top: 50%; text-align: center; position: relative; margin: 0; padding: 0; -webkit-transform: translateY(-50%); -moz-transform: translateY(-50%); -ms-transform: translateY(-50%); -o-transform: translateY(-50%); transform: translateY(-50%); } .list-item { margin: 20px auto; border: 2px solid #fff; width: 50px; padding: 15px; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -ms-transition: all 1s ease; -o-transition: all 1s ease; transition: all 1s ease; } .list-item:hover { border: 2px solid #17BEBB; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -ms-transition: all 1s ease; -o-transition: all 1s ease; transition: all 1s ease; } .list-item:hover .fa { color: #17BEBB; -webkit-transform: scale(1.5); -moz-transform: scale(1.5); -ms-transform: scale(1.5); -o-transform: scale(1.5); transform: scale(1.5); -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -ms-transition: all 1s ease; -o-transition: all 1s ease; transition: all 1s ease; } .list-item a { color: #fff; font-size: 1.7em; display: block; width: 100%; } .fa { -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -ms-transition: all 1s ease; -o-transition: all 1s ease; transition: all 1s ease; } @keyframes showNav { from { left: -100%; } to { left: 0; } } @-webkit-keyframes showNav { from { left: -100%; } to { left: 0; } } @-moz-keyframes showNav { from { left: -100%; } to { left: 0; } } @-o-keyframes showNav { from { left: -100%; } to { left: 0; } } .showNav { -webkit-animation: showNav .5s ease forwards; -moz-animation: showNav 1s ease forwards; -o-animation: showNav 1s ease forwards; animation: showNav .5s ease forwards; } @keyframes hideNav { from { left: 0; } to { left: -100%; } } @-webkit-keyframes hideNav { from { left: 0; } to { left: -100%; } } @-moz-keyframes hideNav { from { left: 0; } to { left: -100%; } } @-o-keyframes hideNav { from { left: 0; } to { left: -100%; } } .hideNav { -webkit-animation: hideNav 1s ease forwards; -moz-animation: hideNav 1s ease forwards; -o-animation: hideNav 1s ease forwards; animation: hideNav 1s ease forwards; } .hidden { display: none; }
.ua { position: absolute; right: 20px; bottom: 20px; color: #fff; font-size: 2em;
}
.ua:hover .fa { color: #17BEBB; -webkit-transform: scale(1.5); -moz-transform: scale(1.5); -ms-transform: scale(1.5); -o-transform: scale(1.5); transform: scale(1.5); -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -ms-transition: all 1s ease; -o-transition: all 1s ease; transition: all 1s ease;
}
Sidebar with smooth transition - Script Codes JS Codes
$(window).load(function() { $(".btn-nav").on("click tap", function() { $(".nav-container").toggleClass("showNav hideNav").removeClass("hidden"); $(this).toggleClass("animated"); }); });
Developer | Antonija Simic |
Username | tonkec |
Uploaded | September 28, 2022 |
Rating | 4.5 |
Size | 2,740 Kb |
Views | 24,288 |
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 |
Static website for free workshop | 3,412 Kb |
Simple text hover effect | 2,203 Kb |
Pure CSS animated hamburger icon | 1,928 Kb |
Flat designed responsive preloader | 2,621 Kb |
A Pen by Antonija Simic | 1,664 Kb |
Pure CSS hamburger icons transition | 2,243 Kb |
Material design navigation menu | 3,012 Kb |
Responsive sidebar revealed on click and key press | 3,001 Kb |
Pure css navigation revealed on hover | 2,142 Kb |
Fullscreen background slideshow | 2,444 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 |
Filtre ile Arama Kutusu - Search Box with Filter | AyhanALTINOK | 3,448 Kb |
Retina canvas w. resize | Erikterwan | 1,882 Kb |
ABVI Menu Discarded | Overdrivemachines | 3,607 Kb |
Nav Test -- cats 1 | Payls | 4,735 Kb |
Button fills | Zubfatal | 5,205 Kb |
03 - CSS Variables | Run-time | 2,682 Kb |
CSS3 Media Queries demo | Machal | 1,824 Kb |
Pictos font library from CodePen | Jstam | 3,790 Kb |
Drag in vanilla js using dotval math instead of translate | Paulq | 2,662 Kb |
A Pen by Matt Popovich | Mpopv | 3,349 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!