Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
<div class="cp_accordionslide05">
<div class="slideitem">
<div class="slidecont">
<h2>タイトル 1</h2>
<div class="text">
<p>テキスト 1</p>
</div>
</div>
</div>
<div class="slideitem">
<div class="slidecont">
<h2>タイトル 2</h2>
<div class="text">
<p>テキスト 2</p>
</div>
</div>
</div>
<div class="slideitem">
<div class="slidecont">
<h2>タイトル 3</h2>
<div class="text">
<p>テキスト 3</p>
</div>
</div>
</div>
<div class="slideitem">
<div class="slidecont">
<h2>タイトル 4</h2>
<div class="text">
<p>テキスト 4</p>
</div>
</div>
</div>
<div class="slideitem">
<div class="slidecont">
<h2>タイトル 5</h2>
<div class="text">
<p>テキスト 5</p>
</div>
</div>
</div>
</div>
.cp_accordionslide05 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
visibility: hidden;
width: 100%;
height: 60vh;
}
.cp_accordionslide05 .slideitem {
position: relative;
visibility: visible;
overflow: hidden;
width: 20%;
height: 100%;
cursor: pointer;
-webkit-transition: all 0.3s linear 0s;
transition: all 0.3s linear 0s;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
}
.cp_accordionslide05 .slideitem:nth-child(1) {
background-image: url('img/sample7.jpg');
}
.cp_accordionslide05 .slideitem:nth-child(2) {
background-image: url('img/sample9.jpg');
}
.cp_accordionslide05 .slideitem:nth-child(3) {
background-image: url('img/sample11.jpg');
}
.cp_accordionslide05 .slideitem:nth-child(4) {
background-image: url('img/sample13.jpg');
}
.cp_accordionslide05 .slideitem:nth-child(5) {
background-image: url('img/sample15.jpg');
}
.cp_accordionslide05 .slideitem:after {
position: absolute;
z-index: 2;
top: -100%;
left: 0;
display: block;
width: 100%;
height: 100%;
content: '';
opacity: 0;
background-color: rgba(240,98,146 ,0.3);
}
.cp_accordionslide05:hover .slideitem:hover {
width: 60%;
}
.cp_accordionslide05:hover .slideitem:not(:hover):after {
top: 0;
visibility: visible;
-webkit-transition: all 0.2s linear 0s;
transition: all 0.2s linear 0s;
opacity: 1;
}
.cp_accordionslide05 .slideitem .slidecont {
position: absolute;
z-index: 4;
bottom: 60px;
left: 30px;
visibility: hidden;
max-width: 400px;
padding: 20px;
-webkit-transform: scale(1.2);
transform: scale(1.2);
color: #ffffff;
border-radius: 5px;
background-color: rgba(194,24,91 ,0.6);
}
.cp_accordionslide05 .slideitem .slidecont h2 {
font-size: 1.4em;
}
.cp_accordionslide05:hover .slideitem:hover .slidecont {
visibility: visible;
-webkit-transition: all 0.2s linear 0.3s;
transition: all 0.2s linear 0.3s;
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
@media only screen and (max-width:768px) {
.cp_accordionslide05 {
height: 80vh;
}
.cp_accordionslide05 .slideitem .slidecont h2 {
font-size: 0.9em;
}
.cp_accordionslide05 .slideitem .slidecont p {
font-size: 0.7em;
}
.cp_accordionslide05 .slideitem .slidecont {
right: 10px;
bottom: 10px;
left: 10px;
}
.cp_accordionslide05:hover .slideitem:hover .slidecont {
left: 10px;
}
}