gpt4 book ai didi

css - 未应用顺序 CSS 选择器

转载 作者:行者123 更新时间:2023-11-27 23:56:29 25 4
gpt4 key购买 nike

你好互联网的人。

我在 React 元素中有以下 CSS(使用 import App.css

导入)
.xBackground {
position: absolute;
width: 80%;
height: 100%;
background-image: url(/static/xBg.jpg);
background-size: cover;
background-position: center center;
top: 0;
right: 40px;
z-index: 0;
}

.xBackground  {
width: 100% !important;
height: 54% !important;
right: 0 !important;
background-position: center left !important;
}

第二个选择器的样式根本没有被应用。

最佳答案

选择器末尾和括号之间有两个空格。删除额外的空间可以解决问题。

关于css - 未应用顺序 CSS 选择器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56237436/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com