
简体中文
transition-duration 属性以秒或毫秒为单位指定过渡动画所需的时间。默认值为 0s,表示不出现过渡动画。
Web | Android | iOS | HarmonyOS |
---|---|---|---|
4.0 | 3.9 | 4.11 | 4.61 |
transition-duration: <time>#;
0s
Template
Script
<template>
<view>
<view :class="class"></view>
<button @click="start">start</button>
<button @click="reset">reset</button>
</view>
</template>
<style>
.box {
width: 100px;
height: 100px;
background-color: blue;
}
.ani {
transition-duration: 5s;
width: 200px;
}
</style>
属性值必须设置单位,无单位时当做非法值处理