簡體   English   中英

圍繞 inline-flex 容器包裹的錨標記 - Firefox 中的文本沒有下划線

[英]Wrapped anchor tag around inline-flex container - text not underlined in Firefox

我正在嘗試在錨標記內嵌套一個 inline-flex 容器(IE11 讓我這樣做了)。 不幸的是,例如,與 Chrom 相比,我在 FireFox 上得到了不同的結果。 在 Chrom 上,文本仍然帶有下划線,而 FF 根本不會在底部畫線。

知道為什么它會這樣工作嗎?

 a{ color: red; }.flex{ display: inline-flex; /* display: flex; */ -> will show the underline }
 <a href="www.google.com"> <div class="flex">Text inside wrapper</div> </a>

如果您希望下划線也出現在 firefox 中,那么只需嘗試將 .flex 的.flex更改為

 a{ color: red; }.flex{ display: inline-flex; text-decoration:underline; /* display: flex; */ -> will show the underline }
 <a href="www.google.com"> <div class="flex">Text inside wrapper</div> </a>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM