久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

標題寬度(H1、H2 等)

Width of Headers (H1, H2 etc)(標題寬度(H1、H2 等))
本文介紹了標題寬度(H1、H2 等)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我希望我的標題(h1 到 h6)具有背景顏色(與頁面背景的顏色不同),我還希望此背景的寬度與標題中文本的寬度相同,加上填充(不是標題所在容器的寬度,這是現在發生的情況).

I want my headers (h1 through h6) to have a background colour (different to that of the page background), I also want the width of this background to be the same as the width of the text in the header, plus padding (Not the width of the container that the header is in, which is what is happening now).

我向您展示任何代碼沒有多大意義,因為這相當簡單(或者無論如何都應該如此!).容器是固定寬度.現在我只為 h1、h2、h3 等標簽設置了一些邊距、填充、背景顏色和字體樣式.

There isn't much point in me showing you any code as this is fairly simple (or it should be anyway!). The container is a fixed width. Right now I have just some margins, padding, background colour and font styling set for the h1, h2, h3 etc tags.

我猜代碼會有所幫助!https://web.archive.org/web/20090724165158/http://adriantrimble.com/headers(這已經應用了 Gerald 的解決方案,盡管顯然這在 IE6/7 中仍然無法工作,并且在較新的瀏覽器中仍然存在問題).使用 display:inline 會導致比它解決的問題更多的問題,使用 float: left 和 clear: left 如上所述由于 2 列布局而存在問題.感謝大家到目前為止的幫助.

I guess code would help! https://web.archive.org/web/20090724165158/http://adriantrimble.com/headers (this has Gerald's solution applied, although obviously this would still not work in IE6/7 and still has problems in newer browsers). Using display:inline causes more problems than it solves, using float: left and clear: left as mentioned has problems because of the 2 column layout. Thanks for everyones help so far.

推薦答案

我會用

#rightcol h1, #rightcol h2, #rightcol h3, #rightcol h4, #rightcol h6, #rightcol h6 {
   float:left;
   clear:left;
}
#rightcol p {clear:left;} 

<小時>

評論后編輯


edit after comment

如果包含的 div 是浮動的,則 clear 不會清除左列.所以將 rightcol 向左浮動并刪除邊距

If the containing div is floated, the clear won't clear the left col. So float rightcol left and remove the margin

#rightcol {
   float:left;
   padding:70px 20px 20px 0px;
   width:585px;
}

這篇關于標題寬度(H1、H2 等)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

JS/HTML5 WebSocket: Connect without HTTP call(JS/HTML5 WebSocket:無需 HTTP 調用即可連接)
Getting #39;400 Bad Request#39; when using multipart/form-data as Content-Type in XHR(在 XHR 中使用 multipart/form-data 作為 Content-Type 時收到“400 Bad Request)
CSS: Repeat Table Header after Page Break (Print View)(CSS:分頁后重復表頭(打印視圖))
Why put JavaScript in the footer of a page?(為什么將 JavaScript 放在頁面的頁腳中?)
Accessing [Symbol(Response internals)] from JSON response(從 JSON 響應訪問 [Symbol(Response internals)])
Put HTML head in another file(將 HTML 頭放在另一個文件中)
主站蜘蛛池模板: 国产目拍亚洲精品99久久精品 | 精品亚洲91 | 天天天天天天天干 | 久久久久久国产精品久久 | 丁香婷婷在线视频 | 国产精品久久久久久久久久久久午夜片 | 国户精品久久久久久久久久久不卡 | 久久久久中文字幕 | 免费黄色大片 | 日韩成人在线一区 | 久久亚洲美女 | 免费在线播放黄色 | 精品久久久久久18免费网站 | www.日本精品 | 日韩欧美国产精品一区二区三区 | 一级毛片视频 | 尤物在线| 91精品国产乱码久久久久久 | 一区二区三区不卡视频 | 精品一区二区三区入口 | 亚洲日韩中文字幕一区 | 三级免费| 亚洲国产成人精品久久久国产成人一区 | 欧美成人一区二区 | 美女视频h | 日韩二三区 | 国产视频第一页 | 久久亚洲一区二区三区四区 | 精品www| 久久久精品视 | 最新日韩在线 | 欧美v片| 亚洲成人一级 | 粉嫩粉嫩芽的虎白女18在线视频 | 一道本视频| 国产精品视频播放 | 国产91亚洲精品一区二区三区 | 久久久久久亚洲精品 | 一区二区高清在线观看 | 亚洲精品久久久久国产 | 99久久免费精品国产免费高清 |