zoukankan      html  css  js  c++  java
  • 页面布局之简单两列布局——全屏,左边固定,右边自适

    不废话,直接代码:

    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title></title>
    <style>
    body{ min-width:960px;}
    .main{ margin-top:5px;overflow:hidden;}
    .top,.left,.right,.foot{border:1px solid grey;}
    .top{height:100px;}
    .left{ width:200px; float:left; height:200px;}
    .right{ height:500px; margin-left:220px;}
    </style>
    </head>
    <body>
    <div class="top">top</div>
    <div class="main">
      <div class="left">left</div>
      <div class="right">right</div>
    </div>
    </body>
    </html>

    呵呵,简单吧,需要注意的是.right的样式中没有float也没有width。

  • 相关阅读:
    iOS
    iOS
    iOS
    iOS
    iOS(WKWebView)OC与JS交互 之三
    iOS(UIWebView 和WKWebView)OC与JS交互 之二
    CentOS VMware 下SSH配置方法详解
    15个nosql数据库
    MySql 优化
    Elasticsearch 相关名词理解
  • 原文地址:https://www.cnblogs.com/feilign/p/3620977.html
Copyright © 2011-2022 走看看