Как правильно убрать данное пустое место без потери контента который внутри?
$(document).ready(function() {
var animation = false,
animDur = 1000,
$row = $('.box__row'),
$cell = $('.box__row-cell'),
$content = $('.box__content'),
$closeBtn = $('.box__close');
var animFalse = function() {
animation = false;
}
var active = function() {
if (animation) return;
var cellData = $(this).data('cell');
var $content = $('.box__content[data-content=' + cellData + ']');
animation = true;
$cell.addClass('cell-fade');
$(this).addClass('active');
$content.addClass('show-content');
$closeBtn.addClass('box-close-active');
setTimeout(animFalse, animDur);
}
var close = function() {
animation = true;
$cell.removeClass('active cell-fade');
$content.removeClass('show-content');
$(this).removeClass('box-close-active');
setTimeout(animFalse, animDur);
}
$row.on('click', '.box__row-cell', active);
$closeBtn.on('click', close);
$cell.on({
mouseenter: function() {
$cell.addClass('hover-cell');
$(this).removeClass('hover-cell');
},
mouseleave: function() {
$cell.removeClass('hover-cell');
}
});
});
html {
box-sizing: border-box;
font-family: 'Roboto', sans-serif;
}
*,
*:before,
*:after {
box-sizing: inherit;
margin: 0;
padding: 0;
}
body {
overflow: hidden;
}
.box__row-cell {
position: absolute;
top: 0;
left: 25%;
height: 49%;
width: 24%;
margin-left: -12%;
background-color: rgba(0, 0, 0, 0.5);
-webkit-transform: translateZ(0);
transform: translateZ(0);
-webkit-transition: all 400ms 600ms, width 300ms 300ms, background-color 300ms 600ms;
transition: all 400ms 600ms, width 300ms 300ms, background-color 300ms 600ms;
cursor: pointer;
overflow: hidden;
z-index: 2;
}
.box__row-cell:after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
opacity: 0;
-webkit-transition: 500ms;
transition: 500ms;
}
.box__row-cell:before {
content: '';
position: absolute;
top: -5%;
left: -5%;
width: 110%;
height: 110%;
background-color: transparent;
opacity: 1;
-webkit-transition: 300ms;
transition: 300ms;
z-index: -3;
}
.box__row-cell:hover:before {
background-color: #F25555;
}
.box__row-cell-info {
margin-left: 20px;
width: 100px;
color: black;
-webkit-transition: 400ms 850ms;
transition: 400ms 850ms;
}
.box__row-cell-info-ep {
margin-top: 25px;
font-size: 10px;
}
.box__row-cell-info-ep span {
padding-left: 10px;
}
@media screen and (max-height: 915px) {
.box__row-cell-info-ep {
margin-top: 10px;
}
}
.box__row-cell-info-title {
letter-spacing: 2px;
margin-top: 15px;
font-size: 20px;
}
@media screen and (max-height: 692px) {
.box__row-cell-info-title {
margin-top: 8px;
font-size: 18px;
}
}
@media screen and (max-height: 692px) {
.box__row-cell-info-title {
font-size: 16px;
margin-top: 4px;
}
}
.box__row-cell-info-sign {
margin: 15px 0 0 2px;
height: 3px;
width: 20px;
background-color: #fff;
border-radius: 1px;
-webkit-transition: 200ms;
transition: 200ms;
z-index: 10;
}
@media screen and (max-height: 800px) {
.box__row-cell-info-sign {
margin-top: 10px;
}
}
.box__row-cell-info--time {
position: absolute;
bottom: 18px;
font-size: 10px;
}
@media screen and (max-height: 650px) {
.box__row-cell-info--time {
right: 20px;
text-align: right;
}
}
.box__row-cell-info--full {
-webkit-transform: translateX(-50px);
transform: translateX(-50px);
opacity: 0;
margin: 50px 0 0 90px;
-webkit-transition: 300ms;
transition: 300ms;
}
.box__row-cell-info--full-heading {
line-height: 60px;
width: 300px;
color: #131313;
font-size: 60px;
font-weight: 900;
}
.box__row-cell-info--full-par {
padding-top: 50px;
color: #fff;
}
.box__row-cell:nth-child(2) {
left: 50%;
}
.box__row-cell:nth-child(3) {
left: 75%;
}
.box__row:nth-child(2) .box__row-cell {
top: 67.5%;
}
.box__row:nth-child(3) .box__row-cell {
top: 100%;
}
.box__content {
position: absolute;
width: 100%;
height: 100%;
left: 0;
background-color: #1C1E22;
-webkit-transform: translateZ(0);
transform: translateZ(0);
opacity: 0;
z-index: -10;
-webkit-transition: all 400ms 600ms, z-index 0ms 0ms;
transition: all 400ms 600ms, z-index 0ms 0ms;
}
.box__content-wrapper {
position: relative;
margin-left: auto;
width: 50%;
height: 100%;
overflow: hidden;
}
.box__content-inner {
position: absolute;
left: 18px;
-webkit-transform: translateX(50px);
transform: translateX(50px);
width: 100%;
height: 100%;
overflow: auto;
opacity: 0;
-webkit-transition: 400ms, opacity 200ms;
transition: 400ms, opacity 200ms;
}
.box__content-text {
padding: 20px 0 30px 8px;
width: 300px;
max-width: 100%;
color: #ababab;
}
.box__content-text-heading {
position: relative;
margin: 50px 0 20px 0;
color: #f5f5f5;
font-size: 16px;
}
.box__content-text-heading:after {
content: '';
position: absolute;
top: -15px;
left: 0;
width: 20px;
height: 2px;
background-color: #a73c3c;
box-shadow: 0 0 1px 0 #a73c3c;
}
.box__content-text-par {
line-height: 22px;
padding-bottom: 10px;
font-size: 14px;
}
.box__content-text-list {
list-style-type: none;
}
.box__content-text-item {
padding-bottom: 3px;
font-size: 14px;
}
.box__content-text-link {
text-decoration: none;
color: #ababab;
font-size: 14px;
}
.box__content-text-link:hover {
text-decoration: underline;
}
.box__close {
position: absolute;
top: 50px;
left: 100px;
height: 20px;
width: 20px;
font-size: 0;
cursor: pointer;
z-index: 9999;
}
.box__close:after, .box__close:before {
content: '';
position: absolute;
top: 9px;
left: -14px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
width: 35px;
height: 2px;
background-color: #fff;
opacity: 0;
-webkit-transition: 500ms;
transition: 500ms;
}
.box__close:before {
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.box__close span {
position: relative;
display: inline-block;
margin: 1px;
width: 4px;
height: 4px;
border-radius: 50%;
background-color: white;
-webkit-transition: 400ms 500ms;
transition: 400ms 500ms;
}
.box__close span:nth-child(6) {
right: 6px;
}
.box__close span:nth-child(7) {
right: 6px;
}
.box__close span:nth-child(8) {
right: 6px;
}
.box__close span:nth-child(9) {
right: 6px;
}
.box__close span:nth-child(10) {
right: 6px;
}
.box__episodes {
position: absolute;
top: 28%;
right: 15px;
color: #fff;
letter-spacing: 2px;
font-size: 10px;
}
.box__episodes:after {
content: '';
position: absolute;
top: -20px;
right: 2px;
width: 15px;
height: 1px;
background-color: #fff;
}
@-webkit-keyframes smokebg {
25% {
-webkit-transform: translate3d(100px, 0, 0) rotate(0.01deg);
transform: translate3d(100px, 0, 0) rotate(0.01deg);
}
50% {
-webkit-transform: translate3d(75px, -25px, 0) rotate(0.01deg);
transform: translate3d(75px, -25px, 0) rotate(0.01deg);
}
75% {
-webkit-transform: translate3d(45px, 30px, 0) rotate(0.01deg);
transform: translate3d(45px, 30px, 0) rotate(0.01deg);
}
100% {
-webkit-transform: translate3d(25px, -15px, 0) rotate(0.01deg);
transform: translate3d(25px, -15px, 0) rotate(0.01deg);
}
}
@keyframes smokebg {
25% {
-webkit-transform: translate3d(100px, 0, 0) rotate(0.01deg);
transform: translate3d(100px, 0, 0) rotate(0.01deg);
}
50% {
-webkit-transform: translate3d(75px, -25px, 0) rotate(0.01deg);
transform: translate3d(75px, -25px, 0) rotate(0.01deg);
}
75% {
-webkit-transform: translate3d(45px, 30px, 0) rotate(0.01deg);
transform: translate3d(45px, 30px, 0) rotate(0.01deg);
}
100% {
-webkit-transform: translate3d(25px, -15px, 0) rotate(0.01deg);
transform: translate3d(25px, -15px, 0) rotate(0.01deg);
}
}
.active {
margin-left: 0;
left: 0 !important;
top: 0 !important;
height: 100%;
width: 50%;
background-color: #F25555;
z-index: 5;
-webkit-transition: all 400ms 400ms, width 300ms 800ms;
transition: all 400ms 400ms, width 300ms 800ms;
cursor: default;
opacity: 1 !important;
}
.box__row-cell.active:nth-child(2) {
}
.active .box__row-cell-info:nth-child(1) {
-webkit-transform: translateX(50px);
transform: translateX(50px);
opacity: 0;
-webkit-transition: 300ms 0ms ease-in, opacity 375ms 0ms;
transition: 300ms 0ms ease-in, opacity 375ms 0ms;
}
.active .box__row-cell-info:nth-child(2) {
-webkit-transform: translateX(50px);
transform: translateX(50px);
opacity: 0;
-webkit-transition: 300ms 50ms ease-in, opacity 375ms 50ms;
transition: 300ms 50ms ease-in, opacity 375ms 50ms;
}
.active .box__row-cell-info:nth-child(3) {
-webkit-transform: translateX(50px);
transform: translateX(50px);
opacity: 0;
-webkit-transition: 300ms 100ms ease-in, opacity 375ms 100ms;
transition: 300ms 100ms ease-in, opacity 375ms 100ms;
}
.active .box__row-cell-info:nth-child(4) {
-webkit-transform: translateX(50px);
transform: translateX(50px);
opacity: 0;
-webkit-transition: 300ms 150ms ease-in, opacity 375ms 150ms;
transition: 300ms 150ms ease-in, opacity 375ms 150ms;
}
.active .box__row-cell-info--full {
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
-webkit-transition: 300ms 900ms;
transition: 300ms 900ms;
}
.cell-fade {
opacity: 0;
-webkit-transition: all 400ms 400ms, width 300ms 800ms, opacity 200ms 300ms;
transition: all 400ms 400ms, width 300ms 800ms, opacity 200ms 300ms;
}
.hover-cell:after {
opacity: 1;
}
.show-content {
opacity: 1;
z-index: 2;
-webkit-transition: all 300ms 400ms, z-index 0ms 0ms;
transition: all 300ms 400ms, z-index 0ms 0ms;
}
.show-content .box__content-inner {
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
-webkit-transition: 300ms 1100ms;
transition: 300ms 1100ms;
}
.box-close-active:after, .box-close-active:before {
opacity: 1;
-webkit-transform: rotate(135deg);
transform: rotate(135deg);
-webkit-transition: 500ms 800ms;
transition: 500ms 800ms;
}
.box-close-active:before {
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
.box-close-active span {
opacity: 0;
-webkit-transition: 0ms 800ms;
transition: 0ms 800ms;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="container">
<div class="box">
<div class="box__row">
<div data-cell='1' class="box__row-cell">
<div class="box__row-cell-info">
<p class='box__row-cell-info-title'>Комплексное юридическое сопровождение деятельности</p>
</div>
<div class="box__row-cell-info">
</div>
<div class="box__row-cell-info--full">
<h1 class="box__row-cell-info--full-heading">Комплексное юридическое сопровождение деятельности</h1>
</div>
</div>
<div data-cell='2' class="box__row-cell">
<div class="box__row-cell-info">
<p class=' box__row-cell-info-title'>Корпоративные пенсионные программы</p>
</div>
<div class="box__row-cell-info">
</div>
<div class="box__row-cell-info--full">
<h1 class="box__row-cell-info--full-heading">Корпоративные пенсионные программы</h1>
</div>
</div>
<div data-cell='3' class="box__row-cell">
<div class="box__row-cell-info">
<p class=' box__row-cell-info-title'>Дистанционное медицинское обслуживание ваших сотрудников</p>
</div>
<div class="box__row-cell-info">
</div>
<div class="box__row-cell-info--full">
<h1 class="box__row-cell-info--full-heading">Дистанционное медицинское обслуживание ваших сотрудников</h1>
</div>
</div>
</div>
<div data-content='1' class="box__content">
<div class="box__content-wrapper">
<div class="box__content-inner">
<div class="box__content-text">
<h2 class='box__content-text-heading'>Заголовок</h2>
<p class='box__content-text-par'>
Полноценный аутсорсинг юридического обслуживания подразумевает консультирование по возникающим вопросам в любом правовом поле, обзор изменений в законодательстве, разработку юридических документов, оценку перспективности судебного разбирательства и, что важно, - представительство интересов в суде и/или государственном органе.
</p>
<p class='box__content-text-par'>
Morbi nisl metus, hendrerit eget ante sed, consequat egestas urna. Quisque et rutrum ligula, eu rutrum ex. Nunc neque mauris, laoreet eu auctor vitae, rutrum molestie dolor. Pellentesque vel vulputate elit, quis rhoncus sapien.
</p>
<h2 class='box__content-text-heading'>SHOW NOTES</h2>
<ul class='box__content-text-list'>
<li class='box__content-text-item'>
Vitae ultrices
</li>
<li class='box__content-text-item'>
Aenean vel
</li>
<li class='box__content-text-item'>
Ut condimentum
</li>
<li class='box__content-text-item'>
Aenean metus
</li>
<li class='box__content-text-item'>
Quisque sodales
</li>
<li class='box__content-text-item'>
Accumsan metus
</li>
</ul>
<h2 class='box__content-text-heading'>FOLLOW</h2>
<a class='box__content-text-link' href="https://twitter.com/mrspok407" target='_blank'>mrspok407 | @mrspok407</a><br>
<a class='box__content-text-link' href="http://codepen.io/mrspok407/" target='_blank'>Checkout my other pens</a>
</div>
</div>
</div>
</div>
<div data-content='2' class="box__content">
<div class="box__content-wrapper">
<div class="box__content-inner">
<div class="box__content-text">
<h2 class='box__content-text-heading'>SYNOPSIS - 44 MIN</h2>
<p class='box__content-text-par'>
Suspendisse non orci porta, consectetur tellus in, gravida felis. Aenean vel posuere lacus. Quisque eget rutrum elit. In eu tortor eget velit scelerisque porttitor.
</p>
<p class='box__content-text-par'>
Morbi nisl metus, hendrerit eget ante sed, consequat egestas urna. Quisque et rutrum ligula, eu rutrum ex. Nunc neque mauris, laoreet eu auctor vitae, rutrum molestie dolor. Pellentesque vel vulputate elit, quis rhoncus sapien.
</p>
<h2 class='box__content-text-heading'>SHOW NOTES</h2>
<ul class='box__content-text-list'>
<li class='box__content-text-item'>
Vitae ultrices
</li>
<li class='box__content-text-item'>
Aenean vel
</li>
<li class='box__content-text-item'>
Ut condimentum
</li>
<li class='box__content-text-item'>
Aenean metus
</li>
<li class='box__content-text-item'>
Quisque sodales
</li>
<li class='box__content-text-item'>
Accumsan metus
</li>
</ul>
<h2 class='box__content-text-heading'>FOLLOW</h2>
<a class='box__content-text-link' href="https://twitter.com/mrspok407" target='_blank'>mrspok407 | @mrspok407</a><br>
<a class='box__content-text-link' href="http://codepen.io/mrspok407/" target='_blank'>Checkout my other pens</a>
</div>
</div>
</div>
</div>
<div data-content='3' class="box__content">
<div class="box__content-wrapper">
<div class="box__content-inner">
<div class="box__content-text">
<h2 class='box__content-text-heading'>SYNOPSIS - 41 MIN</h2>
<p class='box__content-text-par'>
Suspendisse non orci porta, consectetur tellus in, gravida felis. Aenean vel posuere lacus. Quisque eget rutrum elit. In eu tortor eget velit scelerisque porttitor.
</p>
<p class='box__content-text-par'>
Morbi nisl metus, hendrerit eget ante sed, consequat egestas urna. Quisque et rutrum ligula, eu rutrum ex. Nunc neque mauris, laoreet eu auctor vitae, rutrum molestie dolor. Pellentesque vel vulputate elit, quis rhoncus sapien.
</p>
<h2 class='box__content-text-heading'>SHOW NOTES</h2>
<ul class='box__content-text-list'>
<li class='box__content-text-item'>
Vitae ultrices
</li>
<li class='box__content-text-item'>
Aenean vel
</li>
<li class='box__content-text-item'>
Ut condimentum
</li>
<li class='box__content-text-item'>
Aenean metus
</li>
<li class='box__content-text-item'>
Quisque sodales
</li>
<li class='box__content-text-item'>
Accumsan metus
</li>
</ul>
<h2 class='box__content-text-heading'>FOLLOW</h2>
<a class='box__content-text-link' href="https://twitter.com/mrspok407" target='_blank'>mrspok407 | @mrspok407</a><br>
<a class='box__content-text-link' href="http://codepen.io/mrspok407/" target='_blank'>Checkout my other pens</a>
</div>
</div>
</div>
</div>
<div data-content='4' class="box__content">
<div class="box__content-wrapper">
<div class="box__content-inner">
<div class="box__content-text">
<h2 class='box__content-text-heading'>SYNOPSIS - 42 MIN</h2>
<p class='box__content-text-par'>
Suspendisse non orci porta, consectetur tellus in, gravida felis. Aenean vel posuere lacus. Quisque eget rutrum elit. In eu tortor eget velit scelerisque porttitor.
</p>
<p class='box__content-text-par'>
Morbi nisl metus, hendrerit eget ante sed, consequat egestas urna. Quisque et rutrum ligula, eu rutrum ex. Nunc neque mauris, laoreet eu auctor vitae, rutrum molestie dolor. Pellentesque vel vulputate elit, quis rhoncus sapien.
</p>
<h2 class='box__content-text-heading'>SHOW NOTES</h2>
<ul class='box__content-text-list'>
<li class='box__content-text-item'>
Vitae ultrices
</li>
<li class='box__content-text-item'>
Aenean vel
</li>
<li class='box__content-text-item'>
Ut condimentum
</li>
<li class='box__content-text-item'>
Aenean metus
</li>
<li class='box__content-text-item'>
Quisque sodales
</li>
<li class='box__content-text-item'>
Accumsan metus
</li>
</ul>
<h2 class='box__content-text-heading'>FOLLOW</h2>
<a class='box__content-text-link' href="https://twitter.com/mrspok407" target='_blank'>mrspok407 | @mrspok407</a><br>
<a class='box__content-text-link' href="http://codepen.io/mrspok407/" target='_blank'>Checkout my other pens</a>
</div>
</div>
</div>
</div>
<div class="box__close">
<span></span><br>
<span></span>
<span></span><br>
<span></span>
<span></span>
<span></span>
</div>
</div>
Как правильно вставить картинки в данные места?
Айфон мало держит заряд, разбираемся с проблемой вместе с AppLab
Перевод документов на английский язык: Важность и ключевые аспекты
Есть тест из 5 вопросов, на экране виден только 1 вопросПри выборе ответа и нажатии кнопки "далее" появляется следующий вопрос