HTML、CSS_0420

2021/04/20 HTML&CSS 筆記

CSS基礎屬性

  • 背景(background)
  • 邊界
  • 邊框(border)
  • 文字(text)
  • 列表(list)
  • 並排
  • Display(基礎排版)
  • 定位(postion)
  • 溢位 (overflow)
  • BoxM

Background(背景):
    







background-color(背景顏色)
            {background-color : transparent︱( color ) } ;
background-image(背景圖片)
            {background-image : none︱URL ( url ) } ;
background-repeat(背景重複)
            {background-repeat- : repeat︱repeat-x︱repeat-y︱no-repeat } ;
background-position(背景位置)
            { background-position:top︱bottom︱left︱center︱right︱( length )︱( position ) } ;
background-attachment(背景附著 )
            {background-attachment : scroll︱fixed } ;


下面為縮寫寫法
               background: color image repeat position attachment

邊界:
margin(邊界)
            margin:{上邊界值 右邊界值 下邊界值 左邊界值}
                         (順時鐘)
padding(留白)
            padding:{上內邊界值 右內邊界值 下內邊界值 左內邊界值}
                         (順時鐘)


border(邊框) :

border簡寫
            border:{border寬度 border樣式 border顏色};

border-radius:邊界曲度
            border-radius{value};


text(文字):

font-family:字型
font-weight:字體粗細
font-style:字型類型
font-size:字型大小
1em=16px
rem:相對值
letter-spacing:文字字距
line-height:行高
text-align:文字水平對齊
text-ident:文字縮排
vertical-align:文字垂直對齊
        在div區塊沒有作用,只能用於儲存格
text-decoration:文字修飾
text-transform:文字大小轉換
color:文字色彩(跟background-color不一樣)

position(定位):
           position:absolute|relative|static(預設值)|fixed
            top:
            right:
            bottom:
            left:
            z-index:auto|<integer>
            值越大越上層,常用在購物網站的「往上捲」

boxModel:
            .wrap>header+section+aside+footer
            
















2021/04/20

















留言

這個網誌中的熱門文章

jQuery_06/15-06/16

jQuery_06/09-06/11

Vue學習筆記(一)