<div class="cp_accordionslide01">
<div class="slideitem">
<h2>タイトル 1</h2>
<div class="slidecont">
<p>テキスト 1</p>
</div>
</div>
<div class="slideitem">
<h2>タイトル 2</h2>
<div class="slidecont">
<p>テキスト 2</p>
</div>
</div>
<div class="slideitem">
<h2>タイトル 3</h2>
<div class="slidecont">
<p>テキスト 3</p>
</div>
</div>
<div class="slideitem">
<h2>タイトル 4</h2>
<div class="slidecont">
<p>テキスト 4</p>
</div>
</div>
<div class="slideitem">
<h2>タイトル 5</h2>
<div class="slidecont">
<p>テキスト 5</p>
</div>
</div>
</div>
.cp_accordionslide01 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
visibility: hidden;
width: 100%;
height: 60vh;
}
.cp_accordionslide01 .slideitem {
position: relative;
visibility: visible;
width: 20%;
height: 100%;
cursor: pointer;
-webkit-transition: all 0.5s ease-out;
transition: all 0.5s ease-out;
}
.cp_accordionslide01 .slideitem:nth-child(1) {
background: #4fc3f7;
}
.cp_accordionslide01 .slideitem:nth-child(2) {
background: #4dd0e1;
}
.cp_accordionslide01 .slideitem:nth-child(3) {
background: #4db6ac;
}
.cp_accordionslide01 .slideitem:nth-child(4) {
background: #81c784;
}
.cp_accordionslide01 .slideitem:nth-child(5) {
background: #aed581;
}
.cp_accordionslide01:hover .slideitem:hover {
width: 60%;
}
.cp_accordionslide01 .slideitem h2 {
font-size: 1.4em;
padding: 0.5em;
}
.cp_accordionslide01 .slideitem p {
padding: 0.5em;
}
@media only screen and (max-width:768px) {
.cp_accordionslide01 .slideitem h2 {
font-size: 0.8em;
word-wrap: break-word;
}
.cp_accordionslide01 .slideitem p {
font-size: 0.7em;
word-wrap: break-word;
}
.cp_accordionslide01 .slideitem {
width: 20%;
}
.cp_accordionslide01:hover .slideitem {
width: 15%;
}
}