DIV CSS 佈局教程網

padding-bottom:CSS 下內邊距與下內補白
編輯:布局基本知識     

CSS 下內邊距 padding-bottom

padding-bottom 為 padding 的細分屬性,用於設定下邊距(下內邊距)。此屬性與 margin-bottom 看似相同,都能設定下邊距,但一個作用於對象外、一個作用於對象內。


1、語法與用法

 span{padding-bottom:40px} 

為 span 設定下內邊距 40px。

2、padding-bottom 用於什麼地方

有時為了排版好看,讓內容與對象下邊框保持一定距離,這時通常就用 padding-bottom 來設定內容與對象下邊的距離。當然,這裡雖常提到下邊框,但即使沒有邊框,下內邊距依然存在。


3、padding-bottom 存在效果之 DIV CSS 實例

 <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>padding-bottom ThinkCSS</title>
<style>
.exp{padding-bottom:20px}
.divbox{ border:1px solid #F00;}
</style>
</head>
<body>
<div class="exp">
padding-bottom看看此DIV與緊鄰後面DIV距離
</div>
<div class="divbox">看上一個DIV距離</div>
</body>
</html>


CSS 設定 padding-bottom 下內邊距間隔效果應用


padding 存在效果截圖

XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved