如何使用CSS延迟过渡效果
使用transition-delay属性可以延迟CSS的过渡效果。您可以尝试运行以下代码来设置1秒的转换延迟:
示例
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 150px;
height: 150px;
background: blue;
transition: width 3s;
transition-delay: 1s;
}
div:hover {
width: 250px;
}
</style>
</head>
<body>
<h1>Heading One</h1>
<p>Hover over the below box to change its width. It begins with a delay of 1 second.</p>
<div></div>
</body>
</html>热门推荐
10 朋友祝福语卡片简短大气
11 毕业女孩祝福语简短独特
12 冬泳祝福语简短8字
13 卖奶茶开张祝福语简短
14 物业小区高考祝福语简短
15 虎年贺卡和祝福语简短
16 牛年元旦快乐祝福语简短
17 小朋友得奖祝福语简短
18 市场经理生日祝福语简短