<div id="description">
<h2>Приклад 2</h2>
<p>Використання функції sin() для задання розмірів елементів</p>
</div>
<div id="result">
<div class="box"></div>
<div class="box transformed"></div>
</div>
#description {
background: #ccc;
padding: 20px;
font-family: Arial, sans-serif;
}
#result {
display: flex;
justify-content: center;
align-items: center;
height: 200px;
}
.box {
width: 100px;
height: 100px;
background: blue;
margin: 10px;
}
.transformed {
width: calc(100px * sin(45deg));
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.