样式不适用

Style not applying

本文关键字:不适用 样式      更新时间:2023-09-26

我有以下文件state.css。其中有一段代码:

    .linked_location .rating {
        position: absolute;
        right: 180px;
        bottom: 2px;
        height: 30px;
    }

body标记之后的html中,覆盖了以下styles

    <style type="text/css">
    .linked_location .rating {
      position: absolute;
      right: 180px;
      bottom: 2px;
      height: 15px;
    }
    </style>

这是我的输出HTML:(注意:我使用的是XSLT,可能是style标签的问题。

    <div class="linked_location">
    <div class="rating">
    <div class="score">4.<small>3</small>
    </div>
    <span>Rating</span>
    </div>
    </div>

问题是,尽管我在样式标记中将样式手动更新为15px,但它仍使用高度作为30px

不太确定问题是什么,可能与在xslt

中使用样式标记有关

在您的CSS:中尝试

height: 30px!important;