<div id="description">
<h2>Приклад 2</h2>
<p>Використання функції tan() для змінення розмірів елементів</p>
</div>
<div id="result">
<div class="box"></div>
<div class="box transformed"></div>
</div>
#description {
font-style: italic;
text-align: left;
line-height: 1.5;
margin-bottom: 50px;
padding: 12px 16px;
background-color: #f7f7f7;
border: 1px solid #ccc;
}
#result {
display: flex;
justify-content: center;
align-items: center;
}
.box {
width: 100px;
height: 100px;
background: blue;
margin: 10px;
}
.transformed {
width: calc(100px * tan(45));
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.