Изменить расстояние между блоками DIV и принудительно установить высоту и ширину картинок?
Подскажите, как изменить расстояние между блоками DIV и принудительно установить высоту и ширину картинок? Принудительно через width не получается
/* Общие стили */
*, *:after, *:before {
border-box;
box-sizing: border-box;
}
.clearfix:before, .clearfix:after {
content: '';
display: table;
}
.clearfix:after {
clear: both;
}
.hover-text-one {
overflow: hidden;
margin: 0;
width: 100%;
list-style: none;
text-align: center;
height: 50%
}
.hover-text-one figure {
position: relative;
z-index: 1;
display: inline-block;
overflow: hidden;
background: #527c82;
text-align: center;
cursor: pointer;
}
.hover-text-one figure img {
position: relative;
display: block;
min-height: 100%;
opacity: 0.8;
}
.hover-text-one figure figcaption {
padding: 2em;
color: #fff;
text-transform: uppercase;
font-size: 1.25em;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.hover-text-one figure figcaption::before,
.hover-text-one figure figcaption::after {
pointer-events: none;
}
.hover-text-one figure figcaption{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.hover-text-one figure h3 {
word-spacing: -0.15em;
font-weight: 200;
}
.hover-text-one figure h3 span {
font-weight: 500;
}
.hover-text-one figure h3,
.hover-text-one figure p {
margin: 0;
}
.hover-text-one figure p {
letter-spacing: 1px;
font-size: 60%;
}
/* Эффект при наведении */
figure.effect-text-three {
background: #000;
}
figure.effect-text-three img {
width: -webkit-calc(100% + 20px);
width: calc(100% + 20px);
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
transform: scale(1.1);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
figure.effect-text-three:hover img {
opacity: 0.4;
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
figure.effect-text-three figcaption {
text-align: left;
}
figure.effect-text-three h3 {
position: relative;
overflow: hidden;
padding: 0.5em 0;
}
figure.effect-text-three h3::after {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 3px;
background: #fff;
content: '';
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: translate3d(-100%,0,0);
transform: translate3d(-100%,0,0);
}
figure.effect-text-three:hover h3::after {
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
figure.effect-text-three p {
padding: 1em 0;
opacity: 0;
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
-webkit-transform: translate3d(100%,0,0);
transform: translate3d(100%,0,0);
}
figure.effect-text-three:hover p {
opacity: 1;
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
<div class="hover-text-one">
<figure class="effect-text-three"> <img src="/upload/medialibrary/804/yz65nx8r3tml9g7796ukcw7k4vk0p83a.png" alt=""> <figcaption>
<h4>Диагностика</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</p>
</figcaption> </figure>
</div>
<div class="hover-text-one">
<figure class="effect-text-three"> <img src="/upload/medialibrary/d7a/mkieup0sgho0fi03hd8y4zjvy693dofx.png" alt=""> <figcaption>
<h4>Лаборатория</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</p>
</figcaption> </figure>
</div>
<div class="hover-text-one">
<figure class="effect-text-three"> <img src="/upload/medialibrary/1e7/xej68wggo00cyo2yp075mu1eji2uqro2.png" alt=""> <figcaption>
<h4>Прием специалистов</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</p>
</figcaption> </figure>
</div>
<div class="hover-text-one">
<figure class="effect-text-three"> <img src="/upload/medialibrary/c4f/oyi2k1bpb2a985wv3ii3rsek08f56ssa.jpg" alt=""> <figcaption>
<h4>Медицинские справки</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</p>
</figcaption> </figure>
</div>
<div class="hover-text-one">
<figure class="effect-text-three"> <img src="/upload/medialibrary/e9d/jhsucl71grij20j3gf79e89e4tpriz0h.png" alt=""> <figcaption>
<h4>Медицинские услуги на дому</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</p>
</figcaption> </figure>
</div>
<div class="hover-text-one">
<figure class="effect-text-three"> <img src="/upload/medialibrary/c4f/oyi2k1bpb2a985wv3ii3rsek08f56ssa.jpg" alt=""> <figcaption>
<h4>Физиотерапия, Массаж</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</p>
</figcaption> </figure>
</div>
<div class="hover-text-one">
<figure class="effect-text-three"> <img src="/upload/medialibrary/ac3/1h2gm27e1p20hxumj866f7zd7zninboe.png" alt=""> <figcaption>
<h4>Дневной стационар</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</p>
</figcaption> </figure>
</div>
<div class="hover-text-one">
<figure class="effect-text-three"> <img src="/upload/medialibrary/7da/aw79kc061i3bx3j2w79gopruro4cg8r9.png" alt=""> <figcaption>
<h6>Предварительные и периодические медицинские осмотры</h6>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</p>
</figcaption> </figure>
</div>
<div class="hover-text-one">
<figure class="effect-text-three"> <img src="/upload/medialibrary/0a7/sp9g4zx6bk25jcvzi27eetqj77eh12fz.png" alt=""> <figcaption>
<h4>Комплексное обследование здоровья (Чек-Ап)</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</p>
</figcaption> </figure>
</div>
<br>