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=utf-8" />
    <title>无标题文档</title>
    <style>
    *{margin:0;padding:0;}
    .main{
        margin:0 auto;
        width:500px;    
        height:500px;
        background-color:orange;
    }
    .left{
        float:left;
        width:100px;
        height:200px;
        background-color:red;
    }
    .right{
        margin-left:100px;
        height:200px;
        background-color:blue;    
    }
    .test{
        float:left;
        background-color:white;    
    }
    </style>
    </head>
    
    <body>
    
    <div class="main">
        <div class="left">sdf</div>
        <div class="right">asdfasdf
            <div class="test">sadfsf</div>
        </div>
    </div>
    
    
    </body>
    </html>


    当然, 还有几种其他的办法, 自己能懂就好

  • 相关阅读:
    source insight 使用介绍
    android 自定义progressBar
    appium环境安装
    js定义类的三种方法
    对象,函数,构造函数this,原型
    mindjet使用技巧
    在wamp下安装bugfree
    QTP
    powerdesigner使用
    随笔
  • 原文地址:https://www.cnblogs.com/freespider/p/3508749.html
Copyright © 2011-2022 走看看