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_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%;
}
}
<div class="cp_accordionslide02">
<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_accordionslide02 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
visibility: hidden;
width: 100%;
height: 60vh;
}
.cp_accordionslide02 .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_accordionslide02 .slideitem:nth-child(1) {
background-image: url('img/sample6.jpg');
}
.cp_accordionslide02 .slideitem:nth-child(2) {
background-image: url('img/sample7.jpg');
}
.cp_accordionslide02 .slideitem:nth-child(3) {
background-image: url('img/sample8.jpg');
}
.cp_accordionslide02 .slideitem:nth-child(4) {
background-image: url('img/sample9.jpg');
}
.cp_accordionslide02 .slideitem:nth-child(5) {
background-image: url('img/sample10.jpg');
}
.cp_accordionslide02 .slideitem:after {
position: absolute;
z-index: 2;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
content: '';
opacity: 0;
}
.cp_accordionslide02:hover .slideitem:hover {
width: 60%;
}
.cp_accordionslide02 .slideitem .slidecont {
position: absolute;
z-index: 4;
bottom: 60px;
left: 30px;
visibility: hidden;
max-width: 400px;
padding: 20px;
color: #ffffff;
border-radius: 5px;
background-color: rgba(230,74,25 ,0.8);
}
.cp_accordionslide02 .slideitem .slidecont h2 {
font-size: 1.4em;
}
.cp_accordionslide02:hover .slideitem:hover .slidecont {
bottom: 30px;
visibility: visible;
-webkit-transition: all 0.2s linear 0.5s;
transition: all 0.2s linear 0.5s;
opacity: 1;
}
@media only screen and (max-width:768px) {
.cp_accordionslide02 {
height: 80vh;
}
.cp_accordionslide02 .slideitem .slidecont h2 {
font-size: 0.9em;
}
.cp_accordionslide02 .slideitem .slidecont p {
font-size: 0.7em;
}
.cp_accordionslide02 .slideitem .slidecont {
right: 10px;
left: 10px;
}
}
<div class="cp_accordionslide03">
<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_accordionslide03 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
visibility: hidden;
width: 100%;
height: 60vh;
}
.cp_accordionslide03 .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_accordionslide03 .slideitem:nth-child(1) {
background-image: url('img/sample11.jpg');
}
.cp_accordionslide03 .slideitem:nth-child(2) {
background-image: url('img/sample12.jpg');
}
.cp_accordionslide03 .slideitem:nth-child(3) {
background-image: url('img/sample13.jpg');
}
.cp_accordionslide03 .slideitem:nth-child(4) {
background-image: url('img/sample14.jpg');
}
.cp_accordionslide03 .slideitem:nth-child(5) {
background-image: url('img/sample15.jpg');
}
.cp_accordionslide03 .slideitem:after {
position: absolute;
z-index: 2;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
content: '';
opacity: 0;
background-color: rgba(57,73,171 ,0.6);
}
.cp_accordionslide03:hover .slideitem:hover {
width: 60%;
}
.cp_accordionslide03:hover .slideitem:not(:hover):after {
-webkit-transition: all 0.2s linear 0s;
transition: all 0.2s linear 0s;
opacity: 1;
}
.cp_accordionslide03 .slideitem .slidecont {
position: absolute;
z-index: 4;
bottom: 60px;
left: -60px;
visibility: hidden;
max-width: 400px;
padding: 20px;
color: #ffffff;
border-radius: 5px;
background-color: rgba(26,35,126 ,0.6);
}
.cp_accordionslide03 .slideitem .slidecont h2 {
font-size: 1.4em;
}
.cp_accordionslide03:hover .slideitem:hover .slidecont {
left: 30px;
visibility: visible;
-webkit-transition: all 0.3s cubic-bezier(0, 0, 0, 1.82) 0.5s;
transition: all 0.3s cubic-bezier(0, 0, 0, 1.82) 0.5s;
opacity: 1;
}
@media only screen and (max-width:768px) {
.cp_accordionslide03 {
height: 80vh;
}
.cp_accordionslide03 .slideitem .slidecont h2 {
font-size: 0.9em;
}
.cp_accordionslide03 .slideitem .slidecont p {
font-size: 0.7em;
}
.cp_accordionslide03 .slideitem .slidecont {
right: 10px;
bottom: 10px;
left: 10px;
}
.cp_accordionslide03:hover .slideitem:hover .slidecont {
left: 10px;
}
}
<div class="cp_accordionslide04">
<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_accordionslide04 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
visibility: hidden;
width: 100%;
height: 60vh;
}
.cp_accordionslide04 .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_accordionslide04 .slideitem:nth-child(1) {
background-image: url('img/sample6.jpg');
}
.cp_accordionslide04 .slideitem:nth-child(2) {
background-image: url('img/sample8.jpg');
}
.cp_accordionslide04 .slideitem:nth-child(3) {
background-image: url('img/sample10.jpg');
}
.cp_accordionslide04 .slideitem:nth-child(4) {
background-image: url('img/sample12.jpg');
}
.cp_accordionslide04 .slideitem:nth-child(5) {
background-image: url('img/sample14.jpg');
}
.cp_accordionslide04 .slideitem:after {
position: absolute;
z-index: 2;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
content: '';
-webkit-transform: scale(0.7);
transform: scale(0.7);
-webkit-transform-origin: center center;
transform-origin: center center;
opacity: 0;
background-color: rgba(0,96,100 ,0.3);
}
.cp_accordionslide04:hover .slideitem:hover {
width: 60%;
}
.cp_accordionslide04:hover .slideitem:hover:after {
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;
}
.cp_accordionslide04 .slideitem .slidecont {
position: absolute;
z-index: 4;
bottom: 60px;
left: 30px;
visibility: hidden;
max-width: 400px;
padding: 20px;
-webkit-transform: scale(0.7) rotate(-30deg);
transform: scale(0.7) rotate(-30deg);
color: #ffffff;
border-radius: 5px;
background-color: rgba(0,172,193 ,0.8);
}
.cp_accordionslide04 .slideitem .slidecont h2 {
font-size: 1.4em;
}
.cp_accordionslide04:hover .slideitem:hover .slidecont {
visibility: visible;
-webkit-transition: all 0.2s linear 0.6s;
transition: all 0.2s linear 0.6s;
-webkit-transform: scale(1) rotate(0deg);
transform: scale(1) rotate(0deg);
opacity: 1;
}
@media only screen and (max-width:768px) {
.cp_accordionslide04 {
height: 80vh;
}
.cp_accordionslide04 .slideitem .slidecont h2 {
font-size: 0.9em;
}
.cp_accordionslide04 .slideitem .slidecont p {
font-size: 0.7em;
}
.cp_accordionslide04 .slideitem .slidecont {
right: 10px;
bottom: 10px;
left: 10px;
}
.cp_accordionslide04:hover .slideitem:hover .slidecont {
left: 10px;
}
}
<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;
}
}
<div class="cp_accordionslide06">
<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_accordionslide06 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
visibility: hidden;
width: 100%;
height: 60vh;
}
.cp_accordionslide06 .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_accordionslide06 .slideitem:nth-child(1) {
background-image: url('img/sample6.jpg');
}
.cp_accordionslide06 .slideitem:nth-child(2) {
background-image: url('img/sample7.jpg');
}
.cp_accordionslide06 .slideitem:nth-child(3) {
background-image: url('img/sample8.jpg');
}
.cp_accordionslide06 .slideitem:nth-child(4) {
background-image: url('img/sample9.jpg');
}
.cp_accordionslide06 .slideitem:nth-child(5) {
background-image: url('img/sample10.jpg');
}
.cp_accordionslide06 .slideitem:after {
position: absolute;
z-index: 2;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
content: '';
opacity: 0;
background-color: rgba(255,204,128 ,0.6);
}
.cp_accordionslide06:hover .slideitem:hover:after {
visibility: visible;
-webkit-transition: all 0.2s linear 0.4s;
transition: all 0.2s linear 0.4s;
opacity: 1;
}
.cp_accordionslide06:hover .slideitem:hover {
width: 60%;
}
.cp_accordionslide06 .slideitem .slidecont {
position: absolute;
z-index: 4;
bottom: 60px;
left: 30px;
visibility: hidden;
max-width: 400px;
padding: 20px;
-webkit-transform: scale(0.85);
transform: scale(0.85);
color: #ffffff;
border-radius: 5px;
background-color: rgba(239,108,0 ,0.6);
}
.cp_accordionslide06 .slideitem .slidecont h2 {
font-size: 1.4em;
}
.cp_accordionslide06:hover .slideitem:hover .slidecont {
visibility: visible;
-webkit-transition: all 0.2s linear 0.7s;
transition: all 0.2s linear 0.7s;
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
@media only screen and (max-width:768px) {
.cp_accordionslide06 {
height: 80vh;
}
.cp_accordionslide06 .slideitem .slidecont h2 {
font-size: 0.9em;
}
.cp_accordionslide06 .slideitem .slidecont p {
font-size: 0.7em;
}
.cp_accordionslide06 .slideitem .slidecont {
right: 10px;
bottom: 10px;
left: 10px;
}
.cp_accordionslide06:hover .slideitem:hover .slidecont {
left: 10px;
}
}
<div class="cp_accordionslide07">
<div class="slideitem">
<h2>タイトル 1</h2>
<div class="slidecont" title="タイトル 1">
<div class="text">
<p>テキスト1</p>
</div>
</div>
</div>
<div class="slideitem">
<h2>タイトル 2</h2>
<div class="slidecont" title="タイトル 2">
<div class="text">
<p>テキスト2</p>
</div>
</div>
</div>
<div class="slideitem">
<h2>タイトル 3</h2>
<div class="slidecont" title="タイトル 3">
<div class="text">
<p>テキスト3</p>
</div>
</div>
</div>
<div class="slideitem">
<h2>タイトル 4</h2>
<div class="slidecont" title="タイトル 4">
<div class="text">
<p>テキスト4</p>
</div>
</div>
</div>
<div class="slideitem">
<h2>タイトル 5</h2>
<div class="slidecont" title="タイトル 5">
<div class="text">
<p>テキスト5</p>
</div>
</div>
</div>
</div>
.cp_accordionslide07 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
visibility: hidden;
width: 100%;
height: 80vh;
}
.cp_accordionslide07 .slideitem {
position: relative;
visibility: visible;
overflow: hidden;
width: 20%;
height: 100%;
cursor: pointer;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
-webkit-transition-delay: 0s;
transition-delay: 0s;
-webkit-transition-timing-function: linear;
transition-timing-function: linear;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-property: all;
transition-property: all;
color: #ffffff;
}
.cp_accordionslide07 .slideitem:nth-child(1) {
background-image: url("https://copypet.jp/contents/wp-content/uploads/sample11.jpg");
}
.cp_accordionslide07 .slideitem:nth-child(2) {
background-image: url("https://copypet.jp/contents/wp-content/uploads/sample12.jpg");
}
.cp_accordionslide07 .slideitem:nth-child(3) {
background-image: url("https://copypet.jp/contents/wp-content/uploads/sample13.jpg");
}
.cp_accordionslide07 .slideitem:nth-child(4) {
background-image: url("https://copypet.jp/contents/wp-content/uploads/sample14.jpg");
}
.cp_accordionslide07 .slideitem:nth-child(5) {
background-image: url("https://copypet.jp/contents/wp-content/uploads/sample15.jpg");
}
.cp_accordionslide07 .slideitem:after {
position: absolute;
z-index: 2;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
content: '';
}
.cp_accordionslide07:hover .slideitem:hover {
width: 60%;
-ms-flex-negative: 0;
flex-shrink: 0;
}
.cp_accordionslide07 .slideitem .slidecont {
position: absolute;
z-index: 4;
top: 0px;
left: 30px;
visibility: hidden;
max-width: 400px;
padding: 20px;
-webkit-transition: opacity 0.2s ease 0;
transition: opacity 0.2s ease 0;
opacity: 0;
}
.cp_accordionslide07 .slideitem:hover .slidecont {
-webkit-transition: opacity 0.3s ease 0.3s;
transition: opacity 0.3s ease 0.3s;
opacity: 1;
}
.cp_accordionslide07 .slideitem h2 {
font-size: 1.2em;
position: absolute;
bottom: 10px;
left: 50%;
margin: 0;
padding: 0;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
white-space: nowrap;
}
.cp_accordionslide07:hover .slideitem:hover .slidecont {
visibility: visible;
}
@media only screen and (max-width:768px) {
.cp_accordionslide07 .slideitem .slidecont {
position: relative;
right: 0px;
left: 0px;
visibility: visible;
opacity: 1;
min-height: 75vh;
}
.cp_accordionslide07 .slideitem .slidecont .text {
visibility: hidden;
opacity: 0;
-webkit-transition: opacity 0.3s ease 0.3s;
transition: opacity 0.3s ease 0.3s;
}
.cp_accordionslide07 .slideitem:hover .slidecont .text {
visibility: visible;
opacity: 1;
margin-top: 40px;
}
.cp_accordionslide07 .slideitem h2 {
visibility:hidden;
}
.cp_accordionslide07 .slideitem:hover h2 {
visibility: visible;
top: 20px;
left: 65px;
}
.cp_accordionslide07 .slideitem .slidecont::before {
position: absolute;
font-size: 1.2em;
font-weight: bold;
display: block;
text-align: center;
top: 50%;
left: 25%;
width: 12em;
content: attr(title);
-webkit-transform: rotate(-90deg) translateX(-50%);
transform: rotate(-90deg) translateX(-50%);
-webkit-transform-origin: 0 0 0;
transform-origin: 0 0 0;
visibility: visible;
opacity: 1;
}
.cp_accordionslide07 .slideitem:hover .slidecont::before {
visibility:hidden;
opacity: 0;
}
}
<div class="cp_accordionslide08">
<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_accordionslide08 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
background-color: #031625;
}
.cp_accordionslide08:hover .slideitem {
width: 20%;
}
.cp_accordionslide08 .slideitem {
position: relative;
overflow: hidden;
width: 20%;
height: 60vh;
-webkit-transition: width 0.5s ease;
transition: width 0.5s ease;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
color: #ffffff;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
.cp_accordionslide08 .slideitem:nth-child(1) {
background-image: url('img/sample6.jpg');
}
.cp_accordionslide08 .slideitem:nth-child(2) {
background-image: url('img/sample8.jpg');
}
.cp_accordionslide08 .slideitem:nth-child(3) {
background-image: url('img/sample10.jpg');
}
.cp_accordionslide08 .slideitem:nth-child(4) {
background-image: url('img/sample12.jpg');
}
.cp_accordionslide08 .slideitem:nth-child(5) {
background-image: url('img/sample14.jpg');
}
.cp_accordionslide08 .slideitem:before,
.cp_accordionslide08 .slideitem:after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
content: '';
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.cp_accordionslide08 .slideitem:after {
-webkit-transition: opacity 0.5s ease;
transition: opacity 0.5s ease;
opacity: 1;
background: rgba(3, 22, 37, 0.85);
}
.cp_accordionslide08 .slideitem:before {
z-index: 1;
-webkit-transition: opacity 0.5s ease, -webkit-transform 0.5s ease;
transition: opacity 0.5s ease, -webkit-transform 0.5s ease;
transition: opacity 0.5s ease, transform 0.5s ease;
transition: opacity 0.5s ease, transform 0.5s ease, -webkit-transform 0.5s ease;
-webkit-transform: translate3d(0, 0, 0) translateY(50%);
transform: translate3d(0, 0, 0) translateY(50%);
opacity: 0;
background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), color-stop(75%, #000000));
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, #000000 75%);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000000 75%);
}
.cp_accordionslide08 .slideitem:hover {
width: 60% !important;
}
.cp_accordionslide08 .slideitem:hover:after {
opacity: 0;
}
.cp_accordionslide08 .slideitem:hover:before {
-webkit-transition: opacity 1s ease, -webkit-transform 1s ease 0.25s;
transition: opacity 1s ease, -webkit-transform 1s ease 0.25s;
transition: opacity 1s ease, transform 1s ease 0.25s;
transition: opacity 1s ease, transform 1s ease 0.25s, -webkit-transform 1s ease 0.25s;
-webkit-transform: translate3d(0, 0, 0) translateY(0);
transform: translate3d(0, 0, 0) translateY(0);
opacity: 1;
}
.cp_accordionslide08 .slideitem:hover .slidecont {
-webkit-transition: all 0.75s ease 0.5s;
transition: all 0.75s ease 0.5s;
-webkit-transform: translateY(0);
transform: translateY(0);
opacity: 1;
}
.cp_accordionslide08 .slideitem h2 {
font-size: 1.4em;
position: absolute;
z-index: 1;
top: 50%;
left: 50%;
-webkit-transition: all 0.75s ease;
transition: all 0.75s ease;
-webkit-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
white-space: nowrap;
}
.cp_accordionslide08 .slideitem h2::before {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
content: '';
}
.cp_accordionslide08 .slideitem:hover h2 {
top: 2%;
}
.cp_accordionslide08 .slidecont {
position: relative;
z-index: 1;
top: 10%;
margin: 0 1.618em;
-webkit-transform: translate3d(0, 0, 0) translateY(25px);
transform: translate3d(0, 0, 0) translateY(25px);
text-align: center;
opacity: 0;
}
@media only screen and (max-width:768px) {
.cp_accordionslide08 {
display: block;
}
.cp_accordionslide08:hover .slideitem {
width: 100%;
height: 20vh;
}
.cp_accordionslide08 .slideitem {
width: 100%;
height: 20vh;
}
.cp_accordionslide08 .slideitem:hover {
width: 100% !important;
height: 100vh !important;
}
.cp_accordionslide08 .slideitem h2 {
top: 35%;
}
}