Sử dụng thời lượng chuyển tiếp trong CSS để đặt hiệu ứng chuyển tiếp CSS mất bao nhiêu giây hoặc mili giây để hoàn thành -
Ví dụ
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 150px;
height: 150px;
background: blue;
transition-property: height;
transition-duration: 2s;
}
div:hover {
height: 200px;
}
</style>
</head>
<body>
<h1>Heading One</h1>
<p>Hover over the below box to change its height.</p>
<div></div>
</body>
</html>