这次作业的网页内容主要包括三部分,header,content和footer。header用ul元素实现,header中的重点是将li元素水平排布。水平布局通过弹性布局flex来实现。超链接的下划线的去除可以设置text-derocation:none;为了去除li元素前面的原点,设置list-style:none;
content用一个标题和一幅图片组成。通过设置width和text-align来是的content居中。
footer中包括相关链接和网页说明两部分。用两个div元素,为了去除两个div元素中间的空白,设置footer1的margin-bottom和padding-bottom为0px,设置footer2的margin-top和padding-top为0.footer1中又包含了相关链接和公司信息两部分内容,这两个内容分别放在div元素中,每个div元素里面的内容又放在ul元素中。为了让这两个并排显示,设置display:inline-block。
有一些疑问:1.header.wrap的margin设置为margin: 0px auto 0px auto;header.wrap是居中的,但是为什么footer1的margin设置为margin: 0px auto 0px auto;时,footer1是左对齐的。
2.header中的li元素设置为display: inline-block;时为什么li元素不是水平排布的。
3.两个div元素用display: inline-block;水平排布后,不用width和margin的话该如何设置为水平居中。
4..nav1 navlink:hover { background-color: blue; },这一句为什么不起作用。header上如何设置鼠标移过时,header上的超链接的文字的背景变色
5.现在的footer有一些问题,当网页很小时,footer会挡住content的部分内容,该如何改进。
原文:http://www.cnblogs.com/dingzibetter/p/6238412.html