我有个案子:
firstCSSPage.css
.wrong-parent{
font-size: 10px;
}
.wrong-child{
font-size: 5px;
}secondCSSPage.css
.parent {
font-size: 20px;
}.html
<div class="parent">
<div class="wrong-parent">
<span class="wrong-child">
Text test target.
</span>
</div>
<div class="wrong-parent">
<span class="wrong-child">
Text test target seconde.
</span>
</div>
</div>我不能改变.html和firstCSSPage.css
我能不能找到一种方法来强迫跨中的所有文本忽略错误的父母和错误的子css?
发布于 2022-02-14 15:18:15
在secondCSSPage.css中重写同一个类
.wrong-parent{ font-size: unset !important; }
.wrong-child{ font-size: unset !important; }
https://stackoverflow.com/questions/71113983
复制相似问题