日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

html调整文字位在基线显示,html – 将标题对齐到相同的基线,无论后续文字是什么?...

發布時間:2024/8/23 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 html调整文字位在基线显示,html – 将标题对齐到相同的基线,无论后续文字是什么?... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

有沒有辦法將不同大小的多個標題的第一行與同一基線對齊?也不管后面的文本,也應該對齊.

編輯:重新上傳:

在我看來,唯一的解決方案是將每個標題和每個正文文本放入單獨的DIV,然后使用標題來填充頂部或邊緣頂部以對齊它們(例如H1將是36px,0px邊距,而H3將是24px,12px上邊距).像這樣的東西:

div {

width: 240px;

float: left;

}

h1 {

font-size: 36px;

margin: 0;

padding: 0;

}

h3 {

font-size: 24px;

margin: 0;

padding: 10px 0 0 0; /*for some reason I must use 10px instead of 12px to align. Why??*/

}

H1 heading

H3 heading

H3 heading that is somewhat longer and spans multiple lines

There are many variations of passages of Lorem Ipsum available,but the majority have suffered alteration in some form,by injected humour,or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum,you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary,making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words,combined with a handful of model sentence structures,to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition,injected humour,or non-characteristic words etc.

There are many variations of passages of Lorem Ipsum available,or non-characteristic words etc.

但這不是一個很好的解決方案.請問有什么更好的嗎?

非常感謝你!

總結

以上是生活随笔為你收集整理的html调整文字位在基线显示,html – 将标题对齐到相同的基线,无论后续文字是什么?...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。