zoukankan      html  css  js  c++  java
  • HTML的布局

    看了几天的CSS/HTML, 终于有了一定的了解,可以计划弄个个人网站来玩玩;

    在草稿纸上涂鸦整个HTML文档分几个模块组成,且每个模块中想要设计的东西是什么?

    类似于:

    <!DOCTYPE html>

    <html>

    <head>

    <style type="text/css">

    div#container{500px}

    div#header {background-color:#99bbbb;}

    div#menu {background-color:#ffff99;height:200px;150px;float:left;}

    div#content {background-color:#EEEEEE;height:200px;350px;float:left;}

    div#footer {background-color:#99bbbb;clear:both;text-align:center;}  //当属性设置float(浮动)时,他所在的物理位置已经脱离文档流了,但是大多时候我们希望文档流能识别float(浮动),或者是希望float(浮动)后面的元素不被float(浮动)所影响,这个时候我们就需要用clear:both;来清除clear:both;

    h1 {margin-bottom:0;}

    h2 {margin-bottom:0;font-size:18px;}

    ul {margin:0;}

    li {list-style:none;}

    </style> </head>

    <body>

    <div id="container">

    <div id="header"> <h1>Main Title of Web Page</h1> </div>

    <div id="menu"> <h2>Menu</h2> <ul> <li>HTML</li> <li>CSS</li> <li>JavaScript</li> </ul> </div>

    <div id="content">Content goes here</div>

    <div id="footer">Copyright hello.com</div>

    </div>

    </body>

    </html>

  • 相关阅读:
    对《软件工程》这门课的总结
    结对编程项目---四则运算
    PSP记录个人项目耗时情况
    代码复审
    是否需要有代码规范
    四则运算的实现(C++)重做
    四则运算器的实现
    学习进度总结
    通过阅读教材,所得的不懂的问题
    自我介绍
  • 原文地址:https://www.cnblogs.com/tyen0921/p/3513733.html
Copyright © 2011-2022 走看看