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。

  • 相关阅读:
    字符串形式导入模块
    pycharm 远程环境开发调试
    ubuntu 18.04 及初始化python3环境
    nbu备份虚拟机
    转载
    linux/centos/rhel同时安装oracle10g和11g
    多进程
    drf笔记
    单例模式
    常用模块
  • 原文地址:https://www.cnblogs.com/feilign/p/3620977.html
Copyright © 2011-2022 走看看