新聞中心
你對CSS margin-bottom屬性的用法是否熟悉,這里和大家分享一下,margin-bottom屬性主要用來設(shè)置元素的下外邊距,請看下文詳細(xì)介紹。

創(chuàng)新互聯(lián)公司專注于淶水網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠為您提供淶水營銷型網(wǎng)站建設(shè),淶水網(wǎng)站制作、淶水網(wǎng)頁設(shè)計(jì)、淶水網(wǎng)站官網(wǎng)定制、重慶小程序開發(fā)服務(wù),打造淶水網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供淶水網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。
CSS margin-bottom屬性
定義
margin-bottom屬性設(shè)置元素的下外邊距。
注釋:允許使用負(fù)值。
繼承性:NO
JavaScript語法
CSS屬性也可通過一段JavaScript被動態(tài)地改變。
腳本語法:
object.style.marginBottom="32px"例子四個(gè)邊距均為10px:
- h1{
- margin-bottom:10px;
- }
- h1{
- margin-bottom:-20px;
- }
頂邊距和底邊距為10px,左邊距和右邊距是父元素寬度的2%:
h1{margin:10px2%;}頂邊距為10px,左邊距和右邊距是父元素寬度的2%,底邊距是-10px:
h1{margin:10px2%-10px;}頂邊距為10px,右邊距是父元素寬度的2%,底邊距是-10px,而左邊距由瀏覽器設(shè)置:
h1{margin:10px2%-10pxauto;}
可能的值
網(wǎng)頁題目:CSSmargin-bottom屬性使用秘訣
URL標(biāo)題:http://m.fisionsoft.com.cn/article/dpcgooe.html


咨詢
建站咨詢
