<body> <div class="pages" style="width:70%; margin-left:auto; margin-right:auto; position:relative"> <div id=head style="margin-top:20px; width:auto; margin-bottom:0px"> <div id=title style="margin-top:0px;width:100%; height:300px; background-color:#399; background-image:url(../../images/20085280814924_3.jpg)"> </div> <div id=menu style=" margin-top:0px; height:2px; background-color:#F00"> <p style="text-align:right">联系电话:0755-xxxxxxxx</p> <p>联系我们</p> </div> </div> <div id="mains" style="margin-top:0px; position:relative"> <div id="footer" style="margin-top:0px; position:relative"> Copyright All Rights Reserved. </div>
整理下你的代码。。或者截个想要的效果图
你的css有没有reset??
非常对。
整理下你的代码。。或者截个想要的效果图
写css之前,使用 DTD,有必要的话 reset css
......................
这是头部
......................
这里是中间部分
头和中间部分是紧挨着的
......................
中间和脚也是紧挨着的
这里是脚
......................
现在出现的问题是,那段css代码 放上去之后头和中间部分 有一部分空白,
脚有时候跑到了中间,,,
HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号