<div class="container">
<div id="description">
<h2>Приклад 2: зміна повороту блоків залежно від значення atan()</h2>
<p>Він демонструє зміну повороту блоків в залежності від значення atan().</p>
</div>
<div id="result">
<div class="box box0"><span>atan(0)</span></div>
<div class="box box1"><span>atan(1)</span></div>
<div class="box box2"><span>atan(2)</span></div>
</div>
</div>
#description {
background-color: #f2f2f2;
padding: 20px;
text-align: left;
margin-bottom: 50px;
}
#description h2 {
font-family: Arial, sans-serif;
font-size: 24px;
margin-bottom: 10px;
}
#description p {
font-family: Arial, sans-serif;
font-size: 16px;
margin-bottom: 0;
}
#result {
display: flex;
justify-content: space-around;
align-items: center;
}
.box {
width: 100px;
height: 100px;
background-color: blue;
margin: 10px;
transition: transform 0.5s;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
.box0 {
transform: rotate(atan(0));
}
.box1 {
transform: rotate(atan(1));
}
.box2 {
transform: rotate(atan(2));
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.