In this case first-child
is not working? what should I do ? This is my code, and the :first-child
is not working?
<!DOCTYPE html>
<html>
<head>
<style>
.circle:first-child {
width: 100px;
height: 100px;
background-color: red;
position: relative;
animation-name: example;
animation-duration: 6s;
animation-timing-function: linear;
}
@keyframes example {
0% {
left: 0px;
top: 0px;
}
25% {
left: 300px;
border-radius: 0px;
}
50% {
left: 300px;
border-radius: 100px;
}
75% {
left: 0px;
border-radius: 100px;
}
100% {
left: 0px;
border-radius: 0px;
}
}
</style>
</head>
<body>
<div class="circle"></div>
<div class="circle"></div>
</body>
</html>