04day

行间距
line-height = font-size + 行间距
.p{
line-height:100% (相对于字号的100%)
font-size:20px;
}
.p{
line-height:1 (1倍行高) 100%
font-size:20px;
}
.box{
width:100px;
height:200px;
background-color:#bfa;
line-height:200px; (高一致垂直居中)
}
.p2{
font:30px/50px '微软雅黑'; (/50px为行高)
line-height:50px;
}

文本样式
.p1{
text-transform:none (默认)
text-transform:capitalize;(首字母大写)
text-transform:uppercase;(全部大写)
text-transform:lowercase;(全部小写)
}
文本修饰
text-decoration:underLine; 下划线
text-decoration:overline; 上划线
text-decoration:ling-through; 穿过
text-decoration:none 去除超链接下划线
字母间距,汉字间距
letter-spacing:10px;
单词间距
word-spacing:30px;
对齐文本
text-align:left;
text-align:right;
text-align:center;
text-align:justify;
text-indent:2em;

盒子模型
height: 40px;
background-color: red;
border-width: 10px;
border-top-width: 100px; (上部宽)
border-width: 10px 20px 30px 40px (上右下左)
border-width: 10px 20px 30px(上左右下)
border-width: 10px 20px(上下左右)
border-style: solid; (同width)
border-style: dotted;
border-style: dotted solid double;
border-color: green yellow blue orange; (同width)

外边距
margin-top:100px; 上外边距
margin-top: 左外
margin-left:auto; 最右
margin-right:auto; 最左
margin:10px 20px 30px 40px;
margin:0 auto; 左右居中

内边距
padding-top: 100px;
padding-right: 100px;
padding-bottom: 100px;
padding-left: 100px;
/padding:100px 200px 300px 400px;(中)(上下左右)(上左右下)(上右下左)/

边框
/border-width: 30px;
border-color:blue;
border-style: solid;
/
border:10px red solid;
/border-left: red solid 10px;
border-top: red solid 10px;
border-bottom: red solid 10px;
/
border-right: none;

浏览器默认样式
清除浏览器默认样式
*{
margin:0;
padding:0;
}
内联元素盒模型
内联元素不能设置宽高
可在水平方向设内边距,垂直方向也可,不影响布局
可设置边框,垂直方向边框不影响页面布局,水平方向影响。
外边距只支持水平方向,
display和visibility
内联元素(inline)变块元素: 块独占一行
display:block;
inline-block 行内块
区别:
display:none 看不见,不占位置
visibility:hidden 看不见,占位

overflow
overflow:hidden; 超出的切掉
overflow:scroll; 超出的可滚动
overflow:auto; 智能,根据需求自动添加。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 转眼间,来公司已有半年多了。在这段时间里,虽然没有什么成果,但也经历了一段考验和磨砺,非常感谢公司给我这么一个锻炼...
    自风阅读 1,527评论 0 0
  • 1.感恩亚东姐给我送了那么多茶壶,好有爱呀!送了给同事和室友,把爱传出去~ 2.感谢成希妈妈对我的信任,孩子有青春...
    肖馨肖馨阅读 1,352评论 0 1
  • 吴国进攻陈国,却引来了楚国的对峙。吴王阖闾差一点灭亡的楚国,此时已经缓过劲来,虽然楚昭王因病逝于军中,但并不影响楚...
    大意觉迷阅读 6,771评论 0 1
  • 我们心里有一个大锅,里面放了好东西,然后加了很多很多水,慢慢熬煮成为一锅好汤,这就是理想 。最先的时候,柴有点潮湿...
    王陆良阅读 5,560评论 1 6