css基础知识

CSS基础:
  1. id选择器:用#定义(结合div)
  2. class选择器:用.定义(结合div)
  3. 背景:background-color:背景色;background-image:背景图像;background-repeat:背景重复;background-position:位置;background-attachment关联
  4. 文本:text-intent:缩进;text-align:水平对齐;word-spacing:字间隔;letter-spacing:字母间隔;text-transform:大小写转换;text-decoration:文本装饰
  5. 字体:font-family:字体;font-style:倾斜;font-weight:加粗;font-size:字体大小
  6. 链接:a:link a:visited a:hover a:active text-decoration:下划线
  7. 列表:list-style:属性;list-style-type:标志类型;list-style-image:图像标志;list-style-position:标志位置
  8. 表格:border:边框;border-collapse:折叠边框;text-align:水平对齐;vertical-align:垂直对齐
  9. 轮廓:outline:轮廓属性;outline-color outline-style outline-width
CSS框模型:
  1. 框模型:element padding(内边距) margin(外边距) border(边框)
  2. 内边距:padding: top right bottom left
  3. 边框:border: border-style;border-width;border-color
  4. 外边距:margin: top right bottom left
  5. 定位:position: static relative(相对定位) absolute(绝对定位) fixed(固定定位)overflow(溢出区域(auto))
  6. 浮动:float: left right none inherit(except IE)
CSS选择器:
  1. 元素选择器:*:通配符
  2. 类选择器:.
  3. ID选择器:#
  4. 属性选择器:[attribute]
  5. 后代选择器:h1 em {color:red}
  6. 子元素选择器:h1 > strong  结合:table.company td > p
  7. 相邻兄弟选择器: h1 + p {margin-top:50px;}
  8. 伪类:a:link{color:blue};a:visited:{};a:hover{};a:active{}
CSS高级:
  1. 对齐:(1)margin-left:auto;margin-right:auto;(2):position:absolute;(3):float:right;
  2. 尺寸:height:元素高度;line-height:行高;max-height:元素最大高度;max-width:元素最大宽度;min-height:元素最小高度;min-width;width
  3. 分类:display:inline none block;float;clear;cursor;position;visibility
  4. 导航栏:
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值