Awesome CSS Animated Tabs/Content
How do I make an awesome css animated tabs/content?
What is a awesome css animated tabs/content? How do you make a awesome css animated tabs/content? This script and codes were developed by Aaron Levine on 30 January 2023, Monday.
Awesome CSS Animated Tabs/Content - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Awesome CSS Animated Tabs/Content</title> <meta name="viewport" content="width=device-width, minimum-scale=0.81, maximum-scale=0.81, minimal-ui"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <meta content='width=device-width, minimum-scale=0.81, maximum-scale=0.81, minimal-ui' name='viewport'>
<div class='content'> <div class='tabs-v'> <input checked id='rad1' name='rad' type='radio'> <label data-text='Home' for='rad1'></label> <input id='rad2' name='rad' type='radio'> <label data-text='About' for='rad2'></label> <input id='rad3' name='rad' type='radio'> <label data-text='Work' for='rad3'></label> <input id='rad4' name='rad' type='radio'> <label data-text='Contact' for='rad4'></label> <div class='tab-c'> <div class='card'> <h1>Home</h1> <p>The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die.</p> </div> </div> <div class='tab-c'> <div class='card'> <h1>About</h1> <p>Yeah, I like animals better than people sometimes... Especially dogs. Dogs are the best. Every time you come home, they act like they haven't seen you in a year. And the good thing about dogs... is they got different dogs for different people. Like pit bulls. The dog of dogs. Pit bull can be the right man's best friend... or the wrong man's worst enemy. You going to give me a dog for a pet, give me a pit bull. Give me... Raoul. Right, Omar? Give me Raoul.</p> </div> </div> <div class='tab-c'> <div class='card'> <h1>Work</h1> <p>Your bones don't break, mine do. That's clear. Your cells react to bacteria and viruses differently than mine. You don't get sick, I do. That's also clear. But for some reason, you and I react the exact same way to water. We swallow it too fast, we choke. We get some in our lungs, we drown. However unreal it may seem, we are connected, you and I. We're on the same curve, just on opposite ends. Your bones don't break, mine do. That's clear. Your cells react to bacteria and viruses differently than mine. You don't get sick, I do. That's also clear. But for some reason, you and I react the exact same way to water. We swallow it too fast, we choke. We get some in our lungs, we drown. However unreal it may seem, we are connected, you and I. We're on the same curve, just on opposite ends.</p> </div> </div> <div class='tab-c'> <div class='card'> <h1>Contact</h1> <p>The path of the righteous man is beset on all sides by the iniquities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy My brothers. And you will know My name is the Lord when I lay My vengeance upon thee. The path of the righteous man is beset on all sides by the iniquities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy My brothers. And you will know My name is the Lord when I lay My vengeance upon thee.</p> </div> </div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.2/fastclick.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Awesome CSS Animated Tabs/Content - Script Codes CSS Codes
.tabs-v { float: left; display: inline-block; width: 4rem; height: 100%;
}
.tabs-v, .tabs-v * { box-sizing: border-box; -webkit-tap-highlight-color: transparent;
}
.tabs-v > input[type="radio"] { -webkit-appearance: none; -moz-appearance: none; -ms-appearance: none; -o-appearance: none; appearance: none; display: none;
}
.tabs-v > input[type="radio"]:checked + label { background: #FFF; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIi8+PHN0b3Agb2Zmc2V0PSI1MCUiIHN0b3AtY29sb3I9IiMzMzMzMzMiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMzMzMzMzMiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMzMzMzMzMiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #ffffff), color-stop(50%, #ffffff), color-stop(50%, #333333), color-stop(100%, #333333), color-stop(100%, #333333)); background-image: -moz-linear-gradient(left, #ffffff 0%, #ffffff 50%, #333333 50%, #333333 100%, #333333 100%); background-image: -webkit-linear-gradient(left, #ffffff 0%, #ffffff 50%, #333333 50%, #333333 100%, #333333 100%); background-image: linear-gradient(to right, #ffffff 0%, #ffffff 50%, #333333 50%, #333333 100%, #333333 100%); background-size: 200% 200%; background-position: 0;
}
.tabs-v > input[type="radio"]:checked + label:before { -moz-transform: translate(0, -50%); -ms-transform: translate(0, -50%); -webkit-transform: translate(0, -50%); transform: translate(0, -50%); -moz-transform: translate3d(0, -50%, 0); -ms-transform: translate3d(0, -50%, 0); -webkit-transform: translate3d(0, -50%, 0); transform: translate3d(0, -50%, 0); -moz-transition: -moz-transform 0.35s; -o-transition: -o-transform 0.35s; -webkit-transition: -webkit-transform 0.35s; transition: transform 0.35s;
}
.tabs-v > input[type="radio"]:checked + label:after { color: #333;
}
.tabs-v > label { border: none; padding: 0; background: none; outline: none; border-radius: 0; -moz-transition: background-position 0.25s, box-shadow 0.25s; -o-transition: background-position 0.25s, box-shadow 0.25s; -webkit-transition: background-position 0.25s, box-shadow 0.25s; transition: background-position 0.25s, box-shadow 0.25s; position: relative; float: left; display: inline-block; width: 100%; height: 25%; text-align: center; line-height: 25vh; margin: 0; background: #333; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIi8+PHN0b3Agb2Zmc2V0PSI1MCUiIHN0b3AtY29sb3I9IiMzMzMzMzMiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMzMzMzMzMiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMzMzMzMzMiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #ffffff), color-stop(50%, #ffffff), color-stop(50%, #333333), color-stop(100%, #333333), color-stop(100%, #333333)); background-image: -moz-linear-gradient(left, #ffffff 0%, #ffffff 50%, #333333 50%, #333333 100%, #333333 100%); background-image: -webkit-linear-gradient(left, #ffffff 0%, #ffffff 50%, #333333 50%, #333333 100%, #333333 100%); background-image: linear-gradient(to right, #ffffff 0%, #ffffff 50%, #333333 50%, #333333 100%, #333333 100%); background-size: 200% 200%; background-position: 100%; box-shadow: inset 0px 1px 0 #FFF, inset -1px 0 0px 0px #FFF;
}
.tabs-v > label:first-of-type { box-shadow: inset -1px 0 0px 0px #FFF;
}
.tabs-v > label:after { content: attr(data-text); position: absolute; top: 50%; left: 50%; display: inline-block; width: 100%; color: #FFF; text-align: center; -moz-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); -moz-transform: translate3d(-50%, -50%, 0); -ms-transform: translate3d(-50%, -50%, 0); -webkit-transform: translate3d(-50%, -50%, 0); transform: translate3d(-50%, -50%, 0); -moz-transition: color 0.25s; -o-transition: color 0.25s; -webkit-transition: color 0.25s; transition: color 0.25s;
}
.tabs-v > label:before { content: ''; position: absolute; left: 100%; top: 50%; display: inline-block; width: 0; height: 0; border-top: solid 1rem transparent; border-bottom: solid 1rem transparent; border-right: solid 1.5rem transparent; border-left: solid 1.5rem; border-left-color: #FFF; -moz-transform: translate(-5.5rem, -50%); -ms-transform: translate(-5.5rem, -50%); -webkit-transform: translate(-5.5rem, -50%); transform: translate(-5.5rem, -50%); -moz-transform: translate3d(-5.5rem, -50%, 0); -ms-transform: translate3d(-5.5rem, -50%, 0); -webkit-transform: translate3d(-5.5rem, -50%, 0); transform: translate3d(-5.5rem, -50%, 0); -moz-transition: -moz-transform 0.2s; -o-transition: -o-transform 0.2s; -webkit-transition: -webkit-transform 0.2s; transition: transform 0.2s;
}
.tabs-v > .tab-c { position: fixed; display: inline-block; width: 100%; height: 100%; left: 4rem; text-align: center; -moz-transition: -moz-transform 0.5s; -o-transition: -o-transform 0.5s; -webkit-transition: -webkit-transform 0.5s; transition: transform 0.5s;
}
.tabs-v > .tab-c > .card { position: absolute; left: 50%; top: 50%; display: inline-block; width: 70%; max-height: 80%; overflow-x: hidden; overflow-y: auto; padding: 2rem; box-shadow: 0 0 0 1px #FFF; color: #FFF; -webkit-overflow-scrolling: touch; -moz-transform: translate(-50%, -50%) translate(-1.5rem, 0); -ms-transform: translate(-50%, -50%) translate(-1.5rem, 0); -webkit-transform: translate(-50%, -50%) translate(-1.5rem, 0); transform: translate(-50%, -50%) translate(-1.5rem, 0); -moz-transform: translate3d(-50%, -50%, 0) translate3d(-1.5rem, 0, 0); -ms-transform: translate3d(-50%, -50%, 0) translate3d(-1.5rem, 0, 0); -webkit-transform: translate3d(-50%, -50%, 0) translate3d(-1.5rem, 0, 0); transform: translate3d(-50%, -50%, 0) translate3d(-1.5rem, 0, 0);
}
.tabs-v > .tab-c > .card > h1 { margin-top: 0;
}
.tabs-v > input[type="radio"]:nth-of-type(1):checked ~ .tab-c:nth-of-type(1) { -moz-transform: translate(0, 0%); -ms-transform: translate(0, 0%); -webkit-transform: translate(0, 0%); transform: translate(0, 0%); -moz-transform: translate3d(0, 0%, 0); -ms-transform: translate3d(0, 0%, 0); -webkit-transform: translate3d(0, 0%, 0); transform: translate3d(0, 0%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(1):checked ~ .tab-c:nth-of-type(2) { -moz-transform: translate(0, 100%); -ms-transform: translate(0, 100%); -webkit-transform: translate(0, 100%); transform: translate(0, 100%); -moz-transform: translate3d(0, 100%, 0); -ms-transform: translate3d(0, 100%, 0); -webkit-transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(1):checked ~ .tab-c:nth-of-type(3) { -moz-transform: translate(0, 200%); -ms-transform: translate(0, 200%); -webkit-transform: translate(0, 200%); transform: translate(0, 200%); -moz-transform: translate3d(0, 200%, 0); -ms-transform: translate3d(0, 200%, 0); -webkit-transform: translate3d(0, 200%, 0); transform: translate3d(0, 200%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(1):checked ~ .tab-c:nth-of-type(4) { -moz-transform: translate(0, 300%); -ms-transform: translate(0, 300%); -webkit-transform: translate(0, 300%); transform: translate(0, 300%); -moz-transform: translate3d(0, 300%, 0); -ms-transform: translate3d(0, 300%, 0); -webkit-transform: translate3d(0, 300%, 0); transform: translate3d(0, 300%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(2):checked ~ .tab-c:nth-of-type(1) { -moz-transform: translate(0, -100%); -ms-transform: translate(0, -100%); -webkit-transform: translate(0, -100%); transform: translate(0, -100%); -moz-transform: translate3d(0, -100%, 0); -ms-transform: translate3d(0, -100%, 0); -webkit-transform: translate3d(0, -100%, 0); transform: translate3d(0, -100%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(2):checked ~ .tab-c:nth-of-type(2) { -moz-transform: translate(0, 0%); -ms-transform: translate(0, 0%); -webkit-transform: translate(0, 0%); transform: translate(0, 0%); -moz-transform: translate3d(0, 0%, 0); -ms-transform: translate3d(0, 0%, 0); -webkit-transform: translate3d(0, 0%, 0); transform: translate3d(0, 0%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(2):checked ~ .tab-c:nth-of-type(3) { -moz-transform: translate(0, 100%); -ms-transform: translate(0, 100%); -webkit-transform: translate(0, 100%); transform: translate(0, 100%); -moz-transform: translate3d(0, 100%, 0); -ms-transform: translate3d(0, 100%, 0); -webkit-transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(2):checked ~ .tab-c:nth-of-type(4) { -moz-transform: translate(0, 200%); -ms-transform: translate(0, 200%); -webkit-transform: translate(0, 200%); transform: translate(0, 200%); -moz-transform: translate3d(0, 200%, 0); -ms-transform: translate3d(0, 200%, 0); -webkit-transform: translate3d(0, 200%, 0); transform: translate3d(0, 200%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(3):checked ~ .tab-c:nth-of-type(1) { -moz-transform: translate(0, -200%); -ms-transform: translate(0, -200%); -webkit-transform: translate(0, -200%); transform: translate(0, -200%); -moz-transform: translate3d(0, -200%, 0); -ms-transform: translate3d(0, -200%, 0); -webkit-transform: translate3d(0, -200%, 0); transform: translate3d(0, -200%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(3):checked ~ .tab-c:nth-of-type(2) { -moz-transform: translate(0, -100%); -ms-transform: translate(0, -100%); -webkit-transform: translate(0, -100%); transform: translate(0, -100%); -moz-transform: translate3d(0, -100%, 0); -ms-transform: translate3d(0, -100%, 0); -webkit-transform: translate3d(0, -100%, 0); transform: translate3d(0, -100%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(3):checked ~ .tab-c:nth-of-type(3) { -moz-transform: translate(0, 0%); -ms-transform: translate(0, 0%); -webkit-transform: translate(0, 0%); transform: translate(0, 0%); -moz-transform: translate3d(0, 0%, 0); -ms-transform: translate3d(0, 0%, 0); -webkit-transform: translate3d(0, 0%, 0); transform: translate3d(0, 0%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(3):checked ~ .tab-c:nth-of-type(4) { -moz-transform: translate(0, 100%); -ms-transform: translate(0, 100%); -webkit-transform: translate(0, 100%); transform: translate(0, 100%); -moz-transform: translate3d(0, 100%, 0); -ms-transform: translate3d(0, 100%, 0); -webkit-transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(4):checked ~ .tab-c:nth-of-type(1) { -moz-transform: translate(0, -300%); -ms-transform: translate(0, -300%); -webkit-transform: translate(0, -300%); transform: translate(0, -300%); -moz-transform: translate3d(0, -300%, 0); -ms-transform: translate3d(0, -300%, 0); -webkit-transform: translate3d(0, -300%, 0); transform: translate3d(0, -300%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(4):checked ~ .tab-c:nth-of-type(2) { -moz-transform: translate(0, -200%); -ms-transform: translate(0, -200%); -webkit-transform: translate(0, -200%); transform: translate(0, -200%); -moz-transform: translate3d(0, -200%, 0); -ms-transform: translate3d(0, -200%, 0); -webkit-transform: translate3d(0, -200%, 0); transform: translate3d(0, -200%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(4):checked ~ .tab-c:nth-of-type(3) { -moz-transform: translate(0, -100%); -ms-transform: translate(0, -100%); -webkit-transform: translate(0, -100%); transform: translate(0, -100%); -moz-transform: translate3d(0, -100%, 0); -ms-transform: translate3d(0, -100%, 0); -webkit-transform: translate3d(0, -100%, 0); transform: translate3d(0, -100%, 0);
}
.tabs-v > input[type="radio"]:nth-of-type(4):checked ~ .tab-c:nth-of-type(4) { -moz-transform: translate(0, 0%); -ms-transform: translate(0, 0%); -webkit-transform: translate(0, 0%); transform: translate(0, 0%); -moz-transform: translate3d(0, 0%, 0); -ms-transform: translate3d(0, 0%, 0); -webkit-transform: translate3d(0, 0%, 0); transform: translate3d(0, 0%, 0);
}
::-webkit-scrollbar { width: 14px;
}
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.5); box-shadow: inset 0 0 0 4px #333;
}
.content { position: relative; float: left; display: inline-block; width: 100%; height: 100%;
}
html, body { width: 100%; height: 100%; margin: 0; padding: 0; font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; background: #333; overflow: hidden; scrollbar-face-color: #FFF; scrollbar-base-color: #FFF; scrollbar-track-color: #333; scrollbar-arrow-color: #333; scrollbar-shadow-color: #333;
}
Awesome CSS Animated Tabs/Content - Script Codes JS Codes
/* * None of the JS has any affect on the actual tabs/content/animation. It's all just fixing some funky iOS stuff that I can't stand. */
/* * Fun little extra JS for iOS. Prevents Rubberband on body, but allows it on scrollable divs! */
$('.card').on('touchstart', function(){ var $this = $(this); if($this.scrollTop() === 0){ $this.scrollTop(1); }else if($this.scrollTop() === $this[0].scrollHeight-$this.outerHeight()){ $this.scrollTop( $this.scrollTop()-1 ); }
});
$('body').on('touchmove', function(e){ var target = e.originalEvent.srcElement || e.originalEvent.originalTarget, card = $(target).closest('.card'); if(!card.length || card[0].scrollHeight <= $(card).outerHeight()){ e.preventDefault(); }
});
/* * FIxes iOS orientation change bug where content is scrolled up waaaaay too far. */
$(window).on('orientationchange', function(){ $('body').scrollTop(0);
});
/* * Adds responsiveness */
FastClick.attach(document.body);
Developer | Aaron Levine |
Username | Aldlevine |
Uploaded | January 30, 2023 |
Rating | 4.5 |
Size | 7,773 Kb |
Views | 4,048 |
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 |
Colorful Slider Graph | 5,199 Kb |
IOS-7 style slide-toggle | 4,131 Kb |
Blowout Menu | 4,712 Kb |
CSS Spinning Wireframe Sphere | 4,612 Kb |
Kaskade 0.3 - Desktop Demo | 9,186 Kb |
Sliding Single Select | 3,968 Kb |
Progress | 2,659 Kb |
JQuery.momentus | 5,092 Kb |
Card Mockup | 6,436 Kb |
Canvas Falloff Test | 2,989 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 |
Minimelephant | Smashlee | 2,507 Kb |
Ghost Buttons with CSS3 | Mithicher | 2,509 Kb |
Knob rotation | Alemesre | 2,122 Kb |
Arrow Navigation | Hinducows | 1,973 Kb |
LDE old privacy page | Jasonangle | 2,339 Kb |
VerbalExpressions Converter | Cmalven | 2,607 Kb |
Simple canvas drawing -- simplified lines | Anandthakker | 3,127 Kb |
Cartoon Bomb | Tcmulder | 4,929 Kb |
A Pen by Alex Edwards | Exards | 8,218 Kb |
Highbrow Basic HTML Lesson 8 | Kimlarocca | 2,094 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!