Sidebar with smooth transition

Size
2,740 Kb
Views
24,288

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 Previews

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"); }); });
Sidebar with smooth transition - Script Codes
Sidebar with smooth transition - Script Codes
Home Page Home
Developer Antonija Simic
Username tonkec
Uploaded September 28, 2022
Rating 4.5
Size 2,740 Kb
Views 24,288
Do you need developer help for Sidebar with smooth transition?

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!

Antonija Simic (tonkec) Script Codes
Create amazing web content 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!