Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="faq__questions">
					<div class="faq__question">
						<div class="faq__quest active">What is a professional traffic permit?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">When is a professional traffic permit needed?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">How much does a commercial traffic permit cost for goods?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">Where to look for a traffic permit?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">Are there professional traffic permit training courses at a distance?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">Are there differences between a traffic permit and a professional traffic permit?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">How to check the traffic condition?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">How much does a commercial traffic permit cost for goods?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">What are the requirements for a professional traffic permit?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">How to plug in for the traffic permit test?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">Are there professional traffic permit training courses at a distance?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">How is the sample for a professional traffic permit booked?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">What is a professional traffic permit?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">When is a professional traffic permit needed?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">How much does a commercial traffic permit cost for goods?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">Where to look for a traffic permit?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">Are there professional traffic permit training courses at a distance?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">Are there differences between a traffic permit and a professional traffic permit?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">How to check the traffic condition?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">How much does a commercial traffic permit cost for goods?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">What are the requirements for a professional traffic permit?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">How to plug in for the traffic permit test?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">Are there professional traffic permit training courses at a distance?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
					<div class="faq__question">
						<div class="faq__quest active">How is the sample for a professional traffic permit booked?</div>
						<div class="faq__answer">Traffic permits are a requirement for conducting professional traffic.</div>
					</div>
				</div>
<div class="faq-load__btn">
				<button>Load more</button>
			</div>
		
              
            
!

CSS

              
                .faq__questions {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}
.faq__question {
	width: 49.5%;
	margin-bottom: 10px;
	position: relative;
	z-index: 30px;
	display: none;
}
.faq__quest {
	display: flex;
	align-items: center;
	padding: 0px 105px 0px 30px; 
	background-color: #fff;
	height: 90px;
	border-radius: 10px;
	box-shadow: 0px 30px 40px rgba(238, 77, 71, 0.1);
	font-weight: 500;
	font-size: 18px;
	line-height: 30px;
	position: relative;
	cursor: pointer;
	z-index: 3;
}
.faq__answer{
	display: flex;
	padding: 40px 0 0;
	padding-right: 105px;
	padding-left: 30px; 
	background-color: #FFF7F5;
	height: 160px;
	border-top-right-radius: none;
	border-top-left-radius: none;
	border-bottom-right-radius: 10px;
	border-bottom-left-radius: 10px;
	font-weight: 300;
	font-size: 18px;
	line-height: 30px;
	margin-top: -10px;
	cursor: pointer;
	box-shadow: 0px 20px 40px rgba(238, 77, 71, 0.1);
	z-index: -1;
	
}
.faq__quest.active::after{
	content: "";
	position: absolute;
	width: 20px;
	height: 20px;
	background-image: url(https://svgsilh.com/svg_v2/304947.svg);
	background-repeat: no-repeat;
	-webkit-background-size: cover;
	background-size: cover;
	right: 35px;
	top: 50%;
	transform: translateY(-50%);
	transition: all .1s;
}
.faq__quest::after{
	content: "";
	position: absolute;
	width: 20px;
	height: 20px;
	background-image: url(https://image.flaticon.com/icons/svg/25/25232.svg);
	background-repeat: no-repeat;
	-webkit-background-size: cover;
	background-size: cover;
	right: 35px;
	top: 50%;
	transform: translateY(-50%);
	transition: all .1s;
}
.faq__answer {
	display: none;
}
.faq-load__btn{
	text-align: right;
}
.faq-load__btn button{
	border: none;
	width: 49%;
	height: 90px;
	background-color: rgba(237, 77, 71, 0.2);
	border-radius: 10px;
	margin-top: 23px;
	position: relative;
	color: #ED4D47;
	font-weight: 700;
	font-size: 18px;
	line-height: 30px;
	cursor: pointer;
	text-transform: uppercase;
	outline: none;
	margin-left: 20px;

}
.faq-load__btn button::after{
	content: "";
	position: absolute;
	width: 20px;
	height: 20px;
	background-image: url(../images/plus.svg);
	background-repeat: no-repeat;
	-webkit-background-size: cover;
	background-size: cover;
	right: 35px;
	top: 50%;
	transform: translateY(-50%);
}
              
            
!

JS

              
                $(function(){
  
  $(".faq__question").slice(0, 12).show();
  $('.faq-load__btn').on("click", function(e){
     e.preventDefault();
    $(".faq__question:hidden").slice(0, 2).slideDown().css("display", "block");
  });
  
	$('.faq__quest').on("click", function(e){
     e.preventDefault();
    $(this).next('.faq__answer').slideToggle(550);
    $(this).toggleClass('active');

  });


});
              
            
!
999px

Console