/*这是注释*/
html调用css
<div class="">
绝对定位
.head-content { position: absolute; left: 1020px; top: 15px; }
相对定位
.head-content { position: relative; left: 30px; top: 20px; }
格式化页面
* { padding: 0; margin: 0; }
主体颜色
body { background-color: #eeeeee; }
设置长和高
.main-content { width: 960px; height: 1000px; }
li标签没点
.li{ list-style-type:none; }
标签水平居中
margin:0 auto;
其他
.box { margin : 75px auto; /*上下边距75 自由边距居中*/ margin auto;/*上下水平均分悬浮*/ border :5px dotted blue;/*边框:宽度 样式 颜色*/ }
上传图片
background: url("logo.png") no-repeat 0 0;
变色
<p style="color: red">Hello world.</p> background-color: #2459a2; background-color: rgb(57, 107, 179); background-color: green;
变圆
border-radius: 25px;