JSFiddle - React, Tailwind, and code Playground

Pure CSS3 Tabs

by Jennifer Perrin

HTML

<div class="page">
			
			<!-- tabs -->
			<div class="pcss3t pcss3t-icons-top pcss3t-effect-slide-right pcss3t-effect-slide-bottom pcss3t-theme-3">
				<input type="radio" name="pcss3t" checked  id="tab1"class="tab-content-first">
				<label for="tab1"><i class="icon-bolt"></i>Tesla</label>
				
				<input type="radio" name="pcss3t" id="tab2" class="tab-content-2">
				<label for="tab2"><i class="icon-picture"></i>da Vinci</label>
				
				<input type="radio" name="pcss3t" id="tab3" class="tab-content-3">
				<label for="tab3"><i class="icon-cogs"></i>Einstein</label>
				
				<input type="radio" name="pcss3t" id="tab4" class="tab-content-last">
				<label for="tab4"><i class="icon-globe"></i>Newton</label>
				
				<ul>
					<li class="tab-content tab-content-first typography">
						<h1>Nikola Tesla</h1>
						<p>Serbian-American inventor, electrical engineer, mechanical engineer, physicist, and futurist best known for his contributions to the design of the modern alternating current (AC) electrical supply system.</p>
						<p>Tesla started working in the telephony and electrical fields before emigrating to the United States in 1884 to work for Thomas Edison. He soon struck out on his own with financial backers, setting up laboratories/companies to develop a range of electrical devices. His patented AC induction motor and transformer were licensed by George Westinghouse, who also hired Tesla as a consultant to help develop an alternating current system. Tesla is also known for his high-voltage, high-frequency power experiments in New York and Colorado Springs which included patented devices and theoretical work used in the invention of radio communication, for his X-ray experiments, and for his ill-fated attempt at intercontinental wireless transmission in his unfinished Wardenclyffe Tower project.</p>
						<p class="text-right"><em>Find out more about Nikola Tesla from <a href="http://en.wikipedia.org/wiki/Nikola_Tesla"...

CSS

/**/
/* main styles */
/**/
.pcss3t {
	margin: 0;
	padding: 0;
	border: 0;
	outline: none;
	font-size: 0;
	text-align: left;
}
.pcss3t > input {
	position: absolute;
	left: -9999px;
}
.pcss3t > label {
	position: relative;
	display: inline-block;
	margin: 0;
	padding: 0;
	border: 0;
	outline: none;
	cursor: pointer;
	transition: all 0.1s;
	-o-transition: all 0.1s;	
	-ms-transition: all 0.1s;	
	-moz-transition: all 0.1s;	
	-webkit-transition: all 0.1s;
}
.pcss3t > label i {
	display: block;
	float: left;
	margin: 0 8px 0 -2px;
	padding: 0;
	border: 0;
	outline: none;
	font-family: FontAwesome;
	font-style: normal;
	font-size: 17px;
}
.pcss3t > input:checked + label {
	cursor: default;
}
.pcss3t > ul {
	list-style: none;
	position: relative;
	display: block;
	overflow: hidden;
	margin: 0;
	padding: 0;
	border: 0;
	outline: none;
	font-size: 13px;
}
.pcss3t > ul > li {
	position: absolute;
	width: 100%;
	overflow: auto;
	padding: 30px 40px 40px;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	opacity: 0;
	transition: all 0.5s;
	-o-transition: all 0.5s;	
	-ms-transition: all 0.5s;	
	-moz-transition: all 0.5s;	
	-webkit-transition: all 0.5s;
}
.pcss3t > .tab-content-first:checked ~ ul .tab-content-first,
.pcss3t > .tab-content-2:checked ~ ul .tab-content-2,
.pcss3t > .tab-content-3:checked ~ ul .tab-content-3,
.pcss3t > .tab-content-4:checked ~ ul .tab-content-4,
.pcss3t > .tab-content-5:checked ~ ul .tab-content-5,
.pcss3t > .tab-content-6:checked ~ ul .tab-content-6,
.pcss3t > .tab-content-7:checked ~ ul .tab-content-7,
.pcss3t > .tab-content-8:checked ~ ul .tab-content-8,
.pcss3t > .tab-content-9:checked ~ ul .tab-content-9,
.pcss3t > .tab-content-last:checked ~ ul .tab-content-last {
	z-index: 1;
	top: 0;
	left: 0;
	opacity: 1;
	-webkit-transform: scale(1,1);
	-webkit-transform: rotate(0deg);
}


/*----------------------------------------------------------------------------*/
/*                                 EXTENSIONS                                ...