CSS+DIV页面布局实验

  • 格式:doc
  • 大小:82.04 KB
  • 文档页数:10

贵州理工学院实验报告

学院: 专业: 班级:

姓名 学号 实验组 1

实验时间 2018.7.25 指导教师 张德跃 成绩

实验项目名称 CSS+DIV页面布局实验

实验目的及要求 实验内容:

通过div+CSS技术配合盒子模型设计原型,实现大型商务网站首页布局

实验内容及主要步骤 一. 实验内容

制作一个商务网站的页面布局:

Html代码如下:

小米之家框架

码头

CSS修饰代码入下:

*{margin: 0px;padding: 0px}

.top{

background-color: #333;

height: 40px;

}

.navigation{

width:1226px;

height: 50px; border:1px solid yellow;

background-color:yellow;

margin-right: auto;

margin-left: auto;

}

.product{

height: 420px;

width:1226px;

margin-right: auto;

margin-left: auto;

border: solid red;

}

.product>.fright{

height: 420px;

width:226px;

background-color: red;

margin-right: auto;

float: left;

}

.product>.fleft{

height: 420px;

width:998px;

background-color: blue;

float: right;

}

.product>.base{

height:170px;

width:315px; border: 1px solid red;

float: left;

margin-top:15px;

margin-left: 15px;

}

.product>.base1{

height:170px;

width:226px;

border: 1px solid red;

float: left;

margin-top: 15px;

}

.special{

width: 1226px;

height: 438px;

border: 1px solid red;

margin-right: auto;

margin-left: auto;

margin-top: 200px;

}

.special>.shop{

width: 1226px;

height: 58px;

border: 1px solid blue;

}

.special>.shop0{

height: 380px;

width: 226px;

border: 1px solid red;

float: left;

}

.special>.shop1{

height: 380px;

width: 232.5px;

border: 1px solid red;

margin-left:15px;

float: left;

}

.special>.shop2{

height: 58px;

width: 1226px;

float: left;

}

.special>.shop3{

height: 120px;

width: 1226px;

border: 1px solid red;

float: left;

}

.product1{

height: 470px;

width:1226px; margin-right: auto;

margin-left: auto;

border: solid red;

margin-top: 226px;

}

.product1>.fright{

height: 420px;

width:226px;

background-color: red;

margin-right: auto;

float: left;

}

.product1>.fleft{

height: 420px;

width:998px;

background-color: blue;

float: right;

}

.product1>.fleft>.box{

width: 247px;

height: 208px;

border: 1px solid red;

float: left;

}

.p1{

height: 480px;

}

.p2{ width: 1226px;

height: 130px;

border: 1px solid red;

margin-right: auto;

margin-left: auto;

margin-top: 70px;

}

.p3{

height: 50px;

}

.p4{

height: 150px;

width: 1226px;

border: 1px solid red;

margin-right: auto;

margin-left: auto;

}

.p5{

height: 150px;

width: 798px;

border: 1px solid red;

float: left;

}

.p6{

height: 150px;

width: 424px;

border: 1px solid red;

float: left;