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;} 去外边框线

相关文章