<div id="wrap">
<!-- section -->
<div class="section">
<div class="center">
<div class="blocks">
<div class="block">
<div class="block__content"><span>Block 1</span></div>
</div>
<div class="block">
<div class="block__content"><span>Block 2</span></div>
</div>
<div class="block">
<div class="block__content"><span>Block 3</span></div>
</div>
<div class="block">
<div class="block__content"><span>Block 4</span></div>
</div>
<div class="block">
<div class="block__content"><span>Block 5</span></div>
</div>
</div>
</div>
</div>
<!--/section -->
</div>
html,
body {
margin: 0;
padding: 0;
font-family: sans-serif;
font-size: 16px;
line-height: 1.4;
color: #555;
background: #fff;
}
* {
box-sizing: border-box;
}
#wrap {
position: relative;
}
.section {
padding: 40px;
}
.center {
width: 100%;
max-width: 980px;
margin: auto;
}
.blocks {
display: flex;
}
.block {
margin: 10px;
position: relative;
cursor: pointer;
&__content {
padding: 20px;
text-align: center;
position: relative;
z-index: 1;
}
&::before {
content: '';
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: #fff;
box-shadow: 0 0 20px fade(#000, 20%);
border-radius: 4px;
transition: transform .3s ease;
}
&:hover {
z-index: 1;
&::before {
transform: scale(1.4);
}
}
}
View Compiled
This Pen doesn't use any external CSS resources.