弧形背景和倒计时优化

it2023-07-21  74

弧形背景

.pure_top { width: 100%; height: 100px; position: relative; z-index: 0; overflow: hidden; } .pure_top::after { content: ''; width: 120%; height: 100px; position: absolute; left: -10%; //椭圆左边隐藏10%,右边隐藏10% top: 0; border-radius: 0 0 50% 50%; //左上角,右上角,右下角,左下角 background: #1496f1; }

倒计时优化

data(){ wishCountDown : '' }, mounted () { const timer = setInterval(() => { this.wishCountDown = parseInt(this.wishCountDown) - 1 if (this.wishCountDown <= 0) { clearInterval(timer) } }, 1000) this.$once('hook:beforeDestroy', () => { clearInterval(timer) }) },
最新回复(0)