前端笔记整理 html和css部分 (3)

css中路径一般都是用url()来引用

一般class的命名如果需要尽量用下划线 id的命名用中划线

表单:

list-style-position: inside / outside

list-style-type: disc/circle/square

背景

background-attachment: fixed (背景固定)

clear both 应该放在不想被浮动所影响的元素上。

 

padding,border区域支持盒子的背景色。

 

垂直方向的两个相邻margin会合并成高的那个margin的高度。

去边框的方法:border 0

清掉input的边缘 outline: none

 

图文混排:用dl dt dd。

写完padding记得要给盒子宽高做减法。

 

.box *{}//指的是box里面的所有元素

 

padding的数值不能为负数。

 

posted @ 2019-08-15 19:02  wangbing111  阅读(121)  评论(0编辑  收藏  举报