Sehen Sie sich “Section 9 Topic 94” an.
<h1>Transitions</h1>
<div class="circle"></div>
<section>
<div></div>
<div></div>
<div></div>
<div></div>
</section>
HTML.circle {
width: 300px;
height: 300px;
background-color: rgb(9, 255, 0);
transition: background-color 1s, border-radius 2s , margin-left 3s;
}
.circle:hover {
background-color: rgb(255, 217, 0);
border-radius: 50%;
margin-left: 400px;
}
section div {
display: inline-block;
height: 100px;
width: 100px;
background-color: rgb(0, 64, 255);
margin: 20px 0;
border-radius: 50%;
transition: margin-top 3s;
}
section:hover div {
margin-top: 400px;
}
CSS