전환 지연 사용 속성을 사용하여 CSS로 전환 효과에 대한 지연을 설정합니다. 다음 코드를 실행하여 전환 지연을 1초로 설정할 수 있습니다.
예
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 150px;
height: 150px;
background: blue;
transition: width 3s;
transition-delay: 2s;
}
div:hover {
width: 350px;
}
</style>
</head>
<body>
<h1>Heading One</h1>
<p>Hover over the below box to change its width. It begins with a delay of 2 seconds.</p>
<div></div>
</body>
</html>