【2018-01-28】HTML-常用樣式屬性
樣式:
大小:
width 寬度
height:高度
背景:
background-color 背景色
background-image 背景圖片
background-repeat 背景圖的平鋪方式
background-position 背景圖位置
background-size 背景圖的大小
background-attachment 背景圖片是否滾動
字體:
font-family 字體樣式
font-size 字體大小
font-style 傾斜(italic)
font-weight 加粗(bold)
text-decoration 下劃線(underline)上劃線(overline)刪除線(line-through)沒有,用於去除超鏈接的下劃線(none)
color 字體顏色
對齊方式:
text-align 水平對齊
vertical-align 垂直對齊(配合display:table-cell)
line-height 行高
text-lndent 縮進 單位像素
邊界邊框:
margin 外邊距 上右下左
padding 內邊距
border 邊框粗細、樣式、顏色
列表方塊:
list-style none將列表前面的序號去掉
list-style-image 將前面的序號變為圖片
其他:
display 顯示block隱藏none 不占位置
visibility 顯示visible隱藏hidden占位置
overflow 超出範圍hidden隱藏
【2018-01-28】HTML-常用樣式屬性