web前端布局练手项目
2017-02-26 12:06
363 查看
仿北大首页布局(只关心布局)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>练手项目1---Mr.Robot</title> <style type="text/css"> *{ margin: 0; padding: 0; } #top{ margin: 0 auto; /*top栏居中对齐*/ height: 103px; width: 970px; } #top #logo{ height: 103px; width: 277px; float: left; background-color: red; } #top #language{ height: 49px; width: 137px; margin-bottom: 8px; float: right; background-color: green; } #top #nav{ width: 679px; height: 46px; float:right; background-color: green; } #content{ margin: 0 auto; margin-top: 10px; margin-bottom: 10px; height: 435px; width: 970px; /*background-color: gray;*/ } #content #leftpart{ float: left; height: 435px; width: 310px; background-color: yellow; margin-right: 10px; } #content #rightpart{ float: left; width: 650px; height: 435px; margin-bottom: 10px; /*background-color: black;*/ } #content #main{ width: 450px; height: 400px; margin-right: 10px; margin-bottom: 10px; float: left; } #content #rightpart #news1{ width: 450px; height: 240px; margin-bottom: 10px; background-color: skyblue; } #content #rightpart #news2{ width: 450px; height: 110px; margin-bottom: 10px; background-color: green; } #content #rightpart #news3{ width: 450px; height: 30px; margin-bottom: 10px; background-color: skyblue; } #content #rightpart #hotpic{ width: 190px; height: 400px; float: left; background-color: purple; } #content #rightpart #links{ float: left; width: 650px; height: 25px; background-color: yellow; } #footer{ height: 35px; width: 970px; background-color: skyblue; margin: 0 auto; } </style> </head> <body> <!-- 头部 --> <div id="top"> <div id="logo"></div> <div id="language"></div> <div id="nav"></div> </div> <!-- 主要内容 --> <div id="content"> <div id="leftpart"></div> <div id="rightpart"> <div id="main"> <div id="news1"></div> <div id="news2"></div> <div id="news3"></div> </div> <div id="hotpic"></div> <div id="links"></div> </div> </div> <!-- 页尾 --> <div id="footer"></div> </body> </html>
相关文章推荐
- WEB前端:关于项目管理的思考
- 只言碎语总结,今后发展web前端,并分享两个项目难点解决方案。
- 第一个Web前端开发项目:天气应用
- web前端开发——网页布局显示错位的可能原因(shift+F6重命名快捷键的使用注意)
- web前端如何让网页布局稳定性和标准性?
- web前端 左右布局demo
- 简述WEB项目前端脚本的一次重构历程,labJs,requireJs实践[转载]
- Java Web项目前端规范(采用命名空间使js深度解耦合)
- WEB前端开发常见的布局方法
- 【web前端】折腾:瀑布流布局(基于多栏列表流体布局实现)
- 腾讯2013笔试题—web前端笔试题 (老题练手)
- web前端学习笔记(CSS固定宽度布局)
- web前端_表格table布局,同一列两个<td>之间有间隙解决办法。
- 整理部分JS 控件 WEB前端常用的做成Jsp项目,方便今后直接用
- Web前端开发:DIV+CSS网页布局总结
- Web前端代码规范与页面布局
- Java Web 项目前端推荐方案 Bootstrap+Sitemesh+Struts2
- web前端 javascript 实现瀑布流页面布局效果的框架 v1.0.1
- Web前端代码规范与页面布局