web網頁簡單設計補充的css知識點

瞭解了web的基本框架,html和css,補充幾點知識點
常見表示顏色的幾種方法:
red
#f00
rgb(255,0,0)
rgba(255,0,0,0.5) 帶透明度的色彩值
opacity: 50%;透明度
border-radius:圓角
border-radius:值
值:a 表示四角都爲相同的圓角狀態
值:a b 表示 左上,右下都爲a,右上,左下都爲b
值:a b c 表示左上爲a 右上和左下爲b 右下爲c
值:a b c d 依次表示 左上 右上 右下 左下
值:50% 表示圓或橢圓
cursor: pointer; /鼠標圖標成手狀/
定位 所有的定位和top right bottom left 聯和一起起作用
position: relative;
position: absolute;
right:0;
left:0;
relative 相對定位 以默認位置爲參考點進行移動,
absolute 絕對定位 以最近定位元素爲參考點進行移動
fixed 固定定位
定位中水平居中:
margin:auto;
盒子模型:
寬:內容寬+border+margin+padding
box-sizing: border-box;
寬:width+margin (寬=內容寬+border+padding)
圖片格式: gif jpg png webp
overflow:hidden; 溢出隱藏
:first-of-type 第一個同類型對象
:nth-of-type(n) 第n個同類型對象 n=數字 odd(奇數行) even(偶數行)
input{
outline:none;} 去外邊框線
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章