zoukankan      html  css  js  c++  java
  • 三列布局_左右绝对定位_中间适应

    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="utf-8">
    		<title>三列布局_左右绝对定位_中间适应</title>
    		<style type="text/css">
    			.container{
    				position: absolute;
    				left: 0;
    				right: 0;
    			}
    			.left{
    				top: 0;
    				left: 0;
    				position: absolute;
    				 200px;
    				height: 600px;
    				background-color: aqua;
    			}
    			.right{
    				top: 0;
    				right: 0;
    				position: absolute;
    				 200px;
    				height: 600px;
    				background-color: yellowgreen;
    			}
    			.main{
    				margin-left: 200px;
    				margin-right: 200px;
    				height: 600px;
    				background-color: papayawhip;
    			}
    		</style>
    	</head>
    	<body>
    		<h2>基本思路</h2>
    		<ol>
    			<li>左右2列采用绝对定位来布局</li>
    			<li>中间内容部分采用margin挤压出来</li>
    		</ol>
    		<!-- DOM -->
    		<div class="container">
    			<div class="left">左侧</div>
    			<div class="right">右侧</div>
    			<div class="main">主体</div>
    		</div>
    	</body>
    </html>
  • 相关阅读:
    Netty
    HttpClient 该知道一些概念
    Hibernate QBC 简单收集
    IUAP--单点登录
    js图片压缩和上传并显示
    vue移动端项目
    js自定义滚动条
    mysql5.7以上版本安装
    学习webpack
    学习es6
  • 原文地址:https://www.cnblogs.com/webaction/p/14873398.html
Copyright © 2011-2022 走看看