【发布时间】:2021-12-11 17:03:06
【问题描述】:
考虑以下样式:
<template>
<!-- Some Tags -->
<div class="mb-8 w-full">
<span class="subline"></span>
</div>
</template>
.
.
.
<style scoped lang="scss">
.subline {
border-bottom: dashed 2px #eee;
display: block;
}
.subline::before { /* Not working ! */
width: 30px;
height: 20px;
z-index: 99999;
border-bottom: dashed 2px green;
position: fixed;
bottom: 0;
left: 0;
}
</style>
我需要使用::before 但不起作用!
我怎样才能做到这一点?
【问题讨论】:
-
@bassxzero 不,我对
sass语法没有问题。我需要::before在 vuejs 中的作用域样式
标签: css vue.js sass vuejs3 scoped