- 首先每个都设置左右margin,然后,最左最右再分别设置相应的margin为none,更详细的名称,权重也会更大
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>布局框架</title>
<style>
*{
margin: 0;/*将所有的元素边距都设置为0*/
padding: 0;
}
#header{
height: 50px;
background:#E83828;
}
#header .head{
width: 1005px;
height: 50px;
margin: auto;
}
#banner{
height: 500px;
background: slateblue;
}
#category{
width: 1005px;
height: 200px;
margin: auto;
background