css一些属性

margin:10px auto;      上下有10px的空隙 左右居中
overflow:auto;            div溢出了会有滚动条
overflow:hidden;         div溢出了会隐藏溢出的部分

word-break:break-all;   文字内容在容器内强制换行

一定要把一些标签加上display:block; 转换为盒子模型

一些缩写

 background:red url(images/img2.jpg) center center/500px 200px no-repeat;

背景颜色  背景图片 图片位置 图片大小  图片不平铺

  position:fixed;使用toprightbottomleft等属性进行定位,当出现滚动条时,对象不会随着滚动。

position:absolute; 绝对定位

position:relative;  相对定位

display:inline-block;  把盒子模型转换为不是盒子模型,让里面的内容不通条显示

autofocus 自动获取焦点

<img src="images/.png" alt="ljdaljalj">    alt为当图片不能正常显示时的文字提示

原文地址:https://www.cnblogs.com/lsr111/p/4399380.html