CSS進階學習筆記

來源:互聯網
上載者:User

1、DIV與span標記:<div>簡單而言是一個區塊容器的標記。即<div>...</div>之間相當於一個容器,可以容納段落、標題、表格、圖片乃至章節、摘要和備忘等各種html元素。span標記也是一個容器標記。

DIV與span的卻別:div標記類似與p標記,不同的div會換行。span標記是行內標記,不同的span不會換行顯示。

2、盒子模型:一個盒子由content(內容)、border(邊框)、padding(空隙)內容與邊框的距離、margin(間隙)邊框與其他元素的間隔;這四個部分組成。

3、元素的定位:float定位:浮動。

                      position定位:absolute:絕對位置。relative行對定位:

                        z-index空間位置:三位立體位置。各個div之間的層疊管理。

4、CSS排版:主要是用float和position排版。

相關文章

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.