HTML CSS學習小結

2021-07-06 06:14:27 字數 1079 閱讀 8444

css樣式:

1、背景

background-attachment:fixed   //滾動頁面時,固定不動

background-position  背景圖定位 2、

border(邊框) 

border-width 邊框寬度

border-style 邊框樣式   solid實線   dashed 虛線    dotted點線

border-color  邊框顏色

border-width

border-top-width

border-left-width

...border-style

border-top-style

....

border-color

border-top-color

...3、font(字型)

font-weight 文字加粗(bold加粗/normal正常)

font-style 文字傾斜(italic傾斜/normal正常)

line-height 行高

font-family 字型

text-indent 首行縮排(1em=1個文字大小)

text-align 文字對其方式(left/right/center)

text-decoration 文字修飾(underline 下劃線/line-through 刪除線/overline 上劃線/none)

letter-spacing 字母間距(字間距)

4、padding(內填充)

padding在元素的邊框以內,內容以外,padding同樣顯示元素的背景

padding-top padding-right padding-bottom padding-left

可視寬高=border+padding+width(height)

5、margin(外邊距)

margin元素的邊框之外不顯示元素背景

margin:10px 20px .. .. ;

margin-top(right/bottom/left)

margin 相鄰兩個元素的上下margin時可以疊加的

Html Css 基礎小結

html css基本部分個人小結 table table border cellspacing cellpadding bgcolor caption caption 最頂部 thead th th thead 頭部 tfoot td td tfoot table 可以套 列表可以套列表 乙個是在t...

面試小結 html css實現元素居中

園子開闢好長一段時間了,一直都沒有開始寫一篇文章。今天面試的時候提及到寫個技術部落格,於是產生了七個月以來的第一篇博文。從這一篇文章開始,計畫將此部落格用於個人總結和記錄,寫下學習過程中遇到的問題和解決方法。嘮叨完,開始正文內容,如何用html css使得未知寬高的元素水平垂直居中?這也是今天在筆試...

近期學習html css

很遺憾,距離上一次寫部落格,相差了那麼遠。可能是因為不怎麼會甚至嫌寫這些東西麻煩吧。但是個人也像那些前輩那樣子,覺得學習真的應該多總結。從七月11號回來學校,宅宿舍自學 html css 發現要堅持下來真的挺不容易的。有時候一晃就是一天,不知不覺就是乙個星期.看看鏡子發現那個憔悴,無語啊。每次都想著...