首页 > 其他 > 详细

Vue 滚动条动画

时间:2019-12-19 18:06:52      阅读:170      评论:0      收藏:0      [点我收藏+]
<template>
    <div class="home-main">
        <div class="progress-main">
            <div class="progress-content" :style="{width: width100}"></div>
        </div>
    </div>
</template>

<script>

export default {
    name: home,
    data() {
        return {
            width100: 0,
        };
    },
    mounted() {
        setTimeout(() => {
            this.width100 = 80%;
        }, 100);
    },
};
</script>

<style lang="stylus" scoped>
.home-main
    width 100%
    height 100%
    overflow hidden
    position relative
    .progress-main{
        border-radius 100px
        background-color #ebeef5
        overflow hidden
        position relative
        width 200px
        height 10px
        margin 20px 0 0 20px
        .progress-content{
            position absolute
            left 0
            top 0
            height 100%
            background-color #409eff
            border-radius 100px
            transition width 1s ease
        }
    }
</style>

 

技术分享图片

Vue 滚动条动画

原文:https://www.cnblogs.com/1032473245jing/p/12069260.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!