0
transform
Appliquez une transition à une transformation d'échelle. Elle devrait être mise à l'échelle 1,5 fois lorsqu'elle est survolée #element { transition: transform 3s; } #element:hover { transform: scale(1.5); } quel est la bonne réponse? quand je mets le deuxième #element, il me dit que ce n'est pas la bonne réponse plisieurs fois
2 Antwoorden
+ 1
I don't see the real task.
note:
# -> ID
. -> CLASS
+ 1
Your code is actually correct for applying a scale transform with a transition
#element {
transition: transform 3s;
}
#element:hover {
transform: scale(1.5);
}
When you hover over the element it should smoothly scale up to 1.5 times its original size in 3 seconds. If Sololearn says it’s wrong, maybe they expect you to use a class selector (.element) instead of an ID selector (#element). Try this:
.element {
transition: transform 3s;
}
.element:hover {
transform: scale(1.5);
}
So the issue is not with the CSS logic but likely with the selector format the exercise is asking for