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>
    <link  href="style.css" rel="stylesheet" />
      <style type="text/css">
                            #box
                            {
                                    /*高度必须设置,否则IE下子元素的absolute定位异常。且此处应设置为100%,因为内容部分的高度不确定。*/
                                    height:100%;
                                    position:relative;
                                    
                            }
                            #middle
                            {
                                    height:100px;
                                    margin:0 200px;
                                    background-color:red;
                            }
                            #left
                            {
                                    height:100px;
                                    200px;
                                    position:absolute;
                                    top:0px;
                                    left:0px;
                                    background-color:green;
                            }
                            #right
                            {
                                    height:100px;
                                    200px;
                                    position:absolute;
                                    top:0px;
                                    right:0px;
                                    background-color:blue;
                            }
                    </style>
    </head>
    <body>
      <div id="box">
                            <!--优先加载中间部分,后加载两侧-->
                            <div id="middle"></div>
                            <div id="left"></div>
                            <div id="right"></div>
                    </div>
    </body>
    </html>
  • 相关阅读:
    在 ubuntu20 上安装 docker
    在 ubuntu20 上替换原有的源,解决下载软件慢的问题
    thymeleaf 模板语法
    对 spring 中默认的 DataSource 创建进行覆盖
    Spring Security OAuth2 笔记(一)
    对 ThreadLocal 的了解(一)
    解决 docker.io 上拉取 images Get https://registry-1.docker.io/v2/: net/http: TLS handshake timeout
    Spring Security Oauth2 使用 token 访问资源服务器出现异常:Invalid token does not contain resource id (oauth2)
    windows 查看被占用的端口信息
    不写注释的程序员-Models
  • 原文地址:https://www.cnblogs.com/xiaoleidiv/p/3732061.html
Copyright © 2011-2022 走看看