网页重构

93 阅读1分钟
首页 /*书写对应样式*/ /*选择器{ 样式:样式值; } 选择器 1. class选择器 .+class名称*/ /*清除所有的默认间距*/ *{ margin:0; padding: 0; } .header{ /*px像素,单位*/ width: 100%; height: 491px; /*背景色*/ background-color:#cc2700; /*颜色16进制定义法,0-F #000000*/ } .top{ width: 100%; height: 143px; background-color: black; } .bottom{ width: 100%; height: 348px; background-image: url(images/bottomBJ_03.png); } .main{ width: 100%; height: 896px; /*背景图 如果图片不足以覆盖整个元素的话,那么会让图片自动重复以至于铺满整个元素*/ background-image: url(images/mainbg_03.png) } .footer{ width: 100%; height: 124px; background-color: black; } </style>