簡體   English   中英

display:run-in 是否可用? 如果沒有,有什么替代方案?

[英]Is display:run-in usable? If not, what’s the alternative?

我正在嘗試創建一個網頁來模仿法律文件的外觀,其中部分標題為粗體並與該部分第一段的正文相結合。 像這樣的東西:

區域。 最小地塊面積五 (5) 英畝,至少兩 (2) 英畝,不包括濕地。 (1992 年 3 月修訂。)

正面。 在 V 級或更好的道路上行駛兩百 (200) 英尺。 (1999 年 3 月修訂。)

挫折。 距所有公園線兩百 (200) 英尺。

顯而易見的 HTML 是

<h3>Area.</h3>
<p>Minimum lot size five (5) acres with a minimum of two (2) acres excluding wetlands. 
(Amended March 1992.)</p>
<h3>Frontage.</h3>
<p>Two hundred (200) feet on a Class V or better road. (Amended March 1999.)</p>
<h3>Setbacks.</h3>
<p>Two hundred (200) feet from all park lines.</p>

這看起來正是 CSS display: run-in目的。 但從我所讀到的, display: run-in幾乎已經死了。

有沒有好的替代方案?

這是浮動的一個很好的例子:

 h3 { font-weight: bold; float: left; margin: 0 5px; font-size: initial; }
 <h3>Area.</h3> <p>Minimum lot size five (5) acres with a minimum of two (2) acres excluding wetlands. (Amended March 1992.)</p> <h3>Frontage.</h3> <p>Two hundred (200) feet on a Class V or better road. (Amended March 1999.)</p> <h3>Setbacks.</h3> <p>Two hundred (200) feet from all park lines.</p>

暫無
暫無

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

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