帖子
帖子
用户
博客
课程
显示全部楼层
26
帖子
0
勋章
127
Y币

[其他] stml 中写transition没有效果?

[复制链接]
发表于 2021-8-10 12:43:15
.lanyun-collapse__item__body {
    background: #0d0e11;
    height: 0px;


    transition-property: height;
    transition-duration: 3s;
    -moz-transition-duration: 3s; /* Firefox 4 */
    -webkit-transition-duration: 3s; /* Safari 和 Chrome */
    box-sizing: content-box;

    padding:0  20px;
}
.lanyun-collapse__item__body--active {
        /* transition: height ease 14s;
    -webkit-transition: height  ease 14s; */

    height: 600px;


}


transition 是支持的
26
帖子
0
勋章
127
Y币

安卓上没有效果
380
帖子
4
勋章
6
Y币

安卓暂不支持
71
帖子
2
勋章
3892
Y币

原来坑在这。。
380
帖子
4
勋章
6
Y币
山谷回音 · 2023-3-9 18:24原来坑在这。。

很早已经支持了。

<template>
        <view class="page">
                <view>
                        <view class="view1" style={`width: ${viewW}`} @click="clickMe()"></view>
                </view>

        </view>
</template>
<style>
.page {
        width: 100%;
        height: 100%;
}

.view1 {
        height: 100px;
        background: pink;
        transition-property: width;
        transition-duration: 5s;
        transition-delay: 2s;
}

</style>
<script>
export default {
        name: 'test',
        installed() {


        },
        data() {
                return {
                        viewW: '200px'
                }
        },
        methods: {
                clickMe() {
                        this.viewW = '300px'
                }
        }
}
</script>
您需要登录后才可以回帖 登录

本版积分规则