我正在爲WordPress寫一個插件,當我添加鏈接時,下劃線不會消失。我正在使用的主題是二十六個。這裏是我的html:鏈接下劃線不會消失
<a class="thisisunique" href="#" style="text-decoration:none;">some text</a>
我感到非常詫異,這是不行的,因爲text-decoration
甚至內聯。我也包括這在我的CSS:
a.thisisunique, a.thisisunique:link, a.thisisunique:visited, a.thisisunique:hover, a.thisisunique:active, a.thisisunique:focus {
text-decoration: none !important;
}
我甚至包括從主題(https://wordpress.org/support/topic/remove-underline-from-links-2/),誰解釋說,主題不使用text-decoration
的開發代碼,但border-bottom
達到下劃線(無論何種原因) :
.entry-content a, .entry-summary a, .page-content a, .comment-content a, .pingback, .comment-body > a, .textwidget a {
border-bottom: none;
}
但唉,混淆下劃線依然存在。
還有什麼奇怪的是,當我做text-decoration: overline;
時,它實際上是在鏈接上添加了overline。
我錯過了什麼?
您是否已清除瀏覽器緩存? – user2182349
您提出了一個有趣的觀點:當我修改主題以查明發生了什麼時,我注意到沒有任何變化。原來他們被緩存了,所以我必須每次清除緩存。 –