【发布时间】:2020-08-18 00:57:39
【问题描述】:
我有一个由主 CSS 样式文件生成的元素。 HTML部分是:
<div class="footerLine"></div>
开发者工具中的样式显示:
@media (min-width: 1919px)
.footer .footerLine {
background: url(footer.png) no-repeat 35px bottom;
background-size: auto 86px;
width: 100%;
height: 250px;
}
在开发人员工具中更改 height 实际上会按我的意愿更改高度,但是当更改 CSS 本身的高度时,没有任何反应,所以我认为我做错了什么。
我想做的是:
@media screen and (min-width: 1919px)
{
.footerLine
{
height: 50px;
}
}
我什至在没有 media screen 的情况下尝试过,但也没有成功。
【问题讨论】:
-
这是一种来自其他样式表的样式,如果您想使用您的样式,请使用更具体的选择器,或者您可以使用 height: 50px !important
-
我尝试过使用
!important。它没有工作 -
硬刷新