Pure CSS side reveal effect

Size
2,397 Kb
Views
30,360

How do I make an pure css side reveal effect?

What is a pure css side reveal effect? How do you make a pure css side reveal effect? This script and codes were developed by Antonija Simic on 31 October 2022, Monday.

Pure CSS side reveal effect Previews

Pure CSS side reveal effect - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pure CSS side reveal effect</title> <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <main> <aside> <ul class="asideList"> <li><a href="" class="asideAnchor">Link</a></li> <li><a href="" class="asideAnchor">Link</a></li> <li><a href="" class="asideAnchor">Link</a></li> <li><a href="" class="asideAnchor">Link</a></li> </ul> </aside> <section> <input type="checkbox" id="myInput"> <label for="myInput"> <span class="bar top"></span> <span class="bar middle"></span> <span class="bar bottom"></span> </label> <div class="content"> <h1>Pure CSS side reveal effect</h1> </div> </section>
</main>
<a href="https://codepen.io/tonkec" class="ua" target="_blank"> <i class="fa fa-user"></i></a>
</body>
</html>

Pure CSS side reveal effect - Script Codes CSS Codes

body, html { margin: 0; padding: 0; height: 100%; width: 100%; font-family: 'Open Sans', sans-serif;
}
main { height: 100%; width: 100%;
}
aside { background-color: #0799d3; position: fixed; top: 0; bottom: 0; left: 0; width: 20%; z-index: 1;
}
section { position: relative; width: 100%; height: 100%; background-color: #fff; overflow: hidden;
}
label { display: inline-block; padding: 7px 10px; background-color: transparent; cursor: pointer; margin: 10px; z-index: 3; position: fixed;
}
.bar { display: block; background-color: #0799d3; width: 30px; height: 3px; border-radius: 5px; margin: 5px auto; transition: background-color .5s ease-in, transform .5s ease-in, width .5s ease-in;
}
.content { top: 0; bottom: 0; position: absolute; right: 0; left: 0; background-color: #fff; z-index: 2; transition: transform .5s ease-in-out;
}
h1 { margin: 0; position: relative; top: 50%; left: 0; right: 0; transform: translateY(-50%); text-align: center; font-size: 40px;
}
.asideList { list-style: none; padding: 0; margin: 0; margin-top: 100px; text-align: center; border-top: 2px solid rgba(255, 255, 255, .7);
}
.asideAnchor { border-bottom: 2px solid rgba(255, 255, 255, .7); padding: 20px 0; display: block; color: #fff; text-transform: uppercase; text-decoration: none; font-size: 20px; font-weight: 500; position: relative; transition: color .3s .15s ease-in;
}
.asideAnchor::after { content: ""; position: absolute; left: 0; bottom: 0; height: 100%; background-color: #fff; width: 0; transition: width .3s ease-in; z-index: -1;
}
.asideAnchor:hover { color: #0799d3;
}
.asideAnchor:hover::after { width: 100%;
}
input[type="checkbox"] { display: none;
}
input[type="checkbox"]:checked ~ .content { transform: translateX(20%);
}
input[type="checkbox"]:checked ~ label .bar { background-color: #fff;
}
input[type="checkbox"]:checked ~ label .top { -webkit-transform: translateY(0px) rotateZ(45deg); -moz-transform: translateY(0px) rotateZ(45deg); -ms-transform: translateY(0px) rotateZ(45deg); -o-transform: translateY(0px) rotateZ(45deg); transform: translateY(0px) rotateZ(45deg);
}
input[type="checkbox"]:checked ~ label .bottom { -webkit-transform: translateY(-15px) rotateZ(-45deg); -moz-transform: translateY(-15px) rotateZ(-45deg); -ms-transform: translateY(-15px) rotateZ(-45deg); -o-transform: translateY(-15px) rotateZ(-45deg); transform: translateY(-15px) rotateZ(-45deg);
}
input[type="checkbox"]:checked ~ label .middle { width: 0;
}
.middle { margin: 0 auto;
}
.ua { position: absolute; right: 20px; bottom: 20px; color: #0799d3; font-size: 2em; z-index: 2;
}
Pure CSS side reveal effect - Script Codes
Pure CSS side reveal effect - Script Codes
Home Page Home
Developer Antonija Simic
Username tonkec
Uploaded October 31, 2022
Rating 4.5
Size 2,397 Kb
Views 30,360
Do you need developer help for Pure CSS side reveal effect?

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 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!