【发布时间】:2021-09-13 04:03:53
【问题描述】:
非常简单的问题,我认为它可能与 question 有关,但在 Vue 而不是 Angular 中。 我尝试应用于我的 Flickity 轮播的 CSS 样式不会为我的 Vue 3 应用程序呈现。在 IDE 中,样式显示为灰色,但是当我通过检查在浏览器中编辑它们时(例如更改轮播单元格宽度),它可以正常工作。
我是否在某处遗漏了 CSS 导入以使我的 CSS 文件正确地改变我在浏览器中呈现的布局的外观?
<template>
<div class="col d-block m-auto">
<flickity ref="flickity" :options="flickityOptions">
</flickity>
</div>
</template>
<style scoped>
.carousel-cell {
background-color: #248742;
width: 300px; /* full width */
height: 160px; /* height of carousel */
margin-right: 10px;
}
/* position dots in carousel */
.flickity-page-dots {
bottom: 0px;
}
/* white circles */
.flickity-page-dots .dot {
width: 12px;
height: 12px;
opacity: 1;
background: white;
border: 2px solid white;
}
</style>
【问题讨论】:
标签: html css vue.js vuejs3 flickity