0
我有以下文件state.css
。在這裏面,有這段代碼:風格不適用
.linked_location .rating {
position: absolute;
right: 180px;
bottom: 2px;
height: 30px;
}
在我的HTML標籤body
後,我有以下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>
的問題是,它使用了高度30px
儘管我在樣式標籤中手動更新樣式爲15px
。
不太清楚是什麼問題,也許它有使用樣式標籤中xslt
我猜的順序的樣式應用是不同的。內聯樣式可以應用於鏈接樣式表中的樣式之前!更多的HTML可能會有所幫助。 – Sachin
如果您在'
'中聲明樣式,則應該使用以下標記:'