摘要: 1.id选择器,其中每个标签的id选择器的值是唯一的 <div id="text1"> css中用 #text1{ } 2.类选择器(class),可以有多个 <div class="text1"></div> <div class="text1 text2"></div> css中用 .text{ 阅读全文
posted @ 2020-03-18 22:44 陈小歪、 阅读(1932) 评论(0) 推荐(1) 编辑
摘要: 首先了解什么是默认边距 红框和浏览器上方和右边的距离就是默认边距 可以用以下css代码来实现去除默认边距1.*{margin:0;padding:0}2.body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legen 阅读全文
posted @ 2020-03-18 22:07 陈小歪、 阅读(5496) 评论(0) 推荐(0) 编辑
摘要: 首先内边距基本格式 padding-top: ; padding-right: ; padding-bottom: ; padding-left: ; 缩写形式 padding:上 右 下 左; 上代码 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta char 阅读全文
posted @ 2020-03-18 21:28 陈小歪、 阅读(9889) 评论(0) 推荐(0) 编辑
摘要: 同时设置上下左右边框: border: 宽度 样式 颜色; 其中颜色可以省略(默认黑色),样式不能省略 分别设置上右下左边框(1) border-top: 宽度 样式 颜色;(顶部) border-right:宽度 样式 颜色 ;(右边) border-bottom:宽度 样式 颜色 ;(下边) b 阅读全文
posted @ 2020-03-18 19:00 陈小歪、 阅读(14505) 评论(0) 推荐(0) 编辑