<div id="description">
<h2>Приклад 2: ефект тіні</h2>
<p>Два однакових елементи з різними кольорами, один з них має застосовану функцію тіні.</p>
</div>
<div id="result">
<div class="container">
<div class="box">Елемент 1</div>
<div class="box drop-shadowed">Елемент 2</div>
</div>
</div>
/* Стилі для заголовку та опису */
#description {
background-color: #f2f2f2;
padding: 20px;
font-family: Arial, sans-serif;
margin-bottom: 50px;
}
#description h2 {
font-size: 24px;
margin-bottom: 10px;
}
#description p {
font-size: 16px;
}
/* Стилі для прикладу */
.container {
display: flex;
justify-content: space-around;
align-items: center;
}
.box {
width: 150px;
height: 150px;
background-color: blue;
color: white;
text-align: center;
padding: 20px;
}
.drop-shadowed {
filter: drop-shadow(8px 8px 16px rgba(0, 0, 0, 0.75));
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.