码迷,mamicode.com
首页 > 其他好文 > 详细

Vue 滚动条动画

时间:2019-12-19 18:51:56      阅读:354      评论:0      收藏:0      [点我收藏+]

标签:over   com   mic   default   exp   scope   http   set   div   

<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 滚动条动画

标签:over   com   mic   default   exp   scope   http   set   div   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!