學習網頁標準製作網頁之CSS混合布局應用

來源:互聯網
上載者:User
一、Margin(框距)padding(邊框距)
margin屬性設定順序:上右下左
padding屬性設定順序:上右下左
margin:25px 0 25px 0;
簡寫:margin:25px 0;
二、Display顯示內容設定
(1)、Display屬性none (隱藏)
.alt {display:none;}
<span class=”alt”>Content List Part</span>
(2)、Display屬性block (塊/地區)
Img {display:block;}
<img href=”1.gif”></img>
區塊層級元素:存在自身的“盒”中,後面跟隨一個預設的斷行符號
內嵌元素:是流的一部分,後面不跟隨斷行符號
(3)、Display屬性inline
區別block元素,使用inline狀態時,顯示方式按照內嵌元素顯示
三、 動態連結屬性設定:
a:link {
font-weight : bold;
text-decoration : none;
color: #c30;
background: transparent;
}
a:visited {
font-weight : bold;
text-decoration : none;
color: #c30;
background: transparent;
}
a:hover {
font-weight : bold;
text-decoration : underline;
color: #f60;
background: transparent;
}
a:active {
font-weight : bold;
text-decoration : none;
color: #f90;
background: transparent;
}
(1)文字修飾屬性(text-decoration)
Text-decoration:underline overline none;
Underline:連結時有底線
Overline:串連時有上劃線
None:串連時無底線
(2)動態串連屬性順序
(LVHA)- LoVe-HA!
(3)IE/WINDOWS的偽裝欺騙性
應避免使用a:active屬性:出現bug 串連會出現凍結現象
四、如何設定行高(line-height)
Line-height:1.5;
五、如何設定文章位置(text-align)
可選擇屬性(left middle right)
IE6/WINDOWS的BUG會錯誤使文檔置中
六、對於字型的完整CSS應用
Font:13px/1.5 Georigia,”New Centeury Schoolbook”,Times,serif;
七、設定頁面分界限
(1)vertical-align:middle; 等於 <td valign=”middle”>設定垂直對齊
(2)background:none 等於 background:url(images/1.gif) repeat;
八、設定顯示器裝置
<style type=”text/css” media=”screen”> media屬性
使用HTML4.01轉換到XHTML1.0過渡式transitional

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.