10. Transitions: smooth changes
इस लेख का अनुवाद अपने आप होगा। अभी अंग्रेज़ी में दिखाया जा रहा है।
transition makes a change happen gradually instead of instantly. Give the property to animate, and a duration such as 0.3s.
Keep animations short and subtle. Respect users who prefer reduced motion.
उदाहरण देखें
.card {
transition: transform 0.3s;
}
.card:hover {
transform: translateY(-4px);
}
✍️ अब आपकी बारी
Give .card a transition of background-color lasting 0.2s.