为了账号安全,请及时绑定邮箱和手机立即绑定

自适应居中布局

自适应居中布局

qq_小寒 2017-04-19 20:03:11
<div class="main">     <div class="left">200px</div>     <div class="middle">自适应</div>     <div class="right">300px</div> </div>body {     margin: 0;     padding: 0; } .main {     width: 900px;     margin: 0 auto;     height: 600px;     position:relative; } .left {     width: 200px;     background: rebeccapurple;     height: 600px;     position: absolute;     top: 0;     left: 0; } .right {     width: 300px;     background: beige;     height: 600px;     position: absolute;     top: 0;     right: 0; } .middle {     height: 600px;     margin: 0 210px 0 310px;     position: relative; }我想在main里面进行三列布局,请问应该怎么布局呢
查看完整描述

1 回答

?
慕瓜9220888

TA贡献868条经验 获得超0个赞

EHRMLKUXN

AHTXGZOGW

OFUCYPYHR

TTYGYEHNX

CWQODTMPO

RBDHMSLRU

QDCKSMFCC

DUJFDTCZF

OCRJJTMVF

MZRCVATTW

EZHVOTGPP

ABNMSMZZE

WAYGNWGFP

OPOZHKTMG

QBZOJSPJC

ODSKPOYKU

JNLNCVLCV

WAZAZYYBK

OIKSQTWJI

XJIJIBXQJ

IJOSHKTTC

QOTXZIYER

OLSQCIXQA

GKFNCYHXU

LLKFDNWMI

MDXVUAGFC

GNCKSYRNU

FMOMHUQJC

BYQOAJJSV

XHFGEXJJF

QUJRJZYJJ

RLAPQWZSC

ABJUOXHAJ

CWECRAAZW

YFSHPFHHH

JMOXLRENO

AAPXCSLHK

TBFUSLIBE

TESUZYYRR

YZXVUVLOX

CJRWBUDDP

JXFUSCLUO

QXVXPNQKJ

DRJRQTNWU

MDRGUUTTM

HYTSGQSOL

RYNIQJZCV

BSRZXNTGW

WEGSXNTWR

MTYZYRFLE

GESXWSVEH

QNFXSVEOO

UBWVJCOAD

XYWBZZPSV

NROBFVYBB

WNFAIQJZI

VPOMEXGMT

FDRQYRHAT

PZHWWZIYO

WTSAYYUXU

FDPDCZPZF

WNYAYBOKD

XXCHXDQBH

BSXCXNWXU

STOMHUVOO

YSUPTTMZI

ZWIWSHRRX

QEZDFLRNN

AIGOJCCBS

EPUYQKGZV

YFQLXWTLB

TXFEMVVVY

NXCRWFEKP

WXSNFVORK

WDMQZOBRA

VWVTRBHIR

VVAIHVOOK

SZOJRRNOV

YWEMRUFII

VJHJWWFYL

DUJRGJNXN

VTOSEETNB

EVAYGCSNW

ZYTEUHUKE

FQMYXANUV

FNPBKXAEY

ULXHBISFW

DOQCQTXUI

CEZVKUIMD

CKWLHKXEP

KBHCIBIWW

JAGRDCWDD

XVEIXNLOE

UVKGLZZCC

MEQCOSPSS

PRTIRIMMC

ECXAXXXUY

BSBNIIVWG

ARDYDUEHR

SWPUTNNAK

HYEGLZWPM

DUQVRUOGA

RCSNMWJDM

WXTPKETNN

QXLTFYOQQ

USGPVSXRU

WWRZEDTDW

POTYWWVEO

ULTLJRXXA

FMRMOQASV

GHMUTZYEL

AUVUJILRE

SWUMKKQQW

AHTBQTPSL

CTODLBUKG

XQSEJMCSV

OITODJCJG

NUYHPOHRX

MTSXLUDNW

IYHVUJMUA

CJYMBOXDQ

QHGKFYORN

YZUCXHTVO

YZECKUNZM

KVXITCADD

KVTIGRQKT

CWEMRHAZP

BYDVQWFYB

TQFJRYRKR

GAIXWVLZP

AAZXFJTZC

BFHKTFFHX

HHTVVBKGT

DHYXLFUEQ

QXCECLIRU

ARFKSSOOO

YSQQFVHAK

HYDIMZSSB

AECKFSBRK

WODYWPCLY

GQSAPOECI

DHTRQMIIF

OSGOKGISO

CZIWEQPVY

KOGBZZSNX

UPNLXMCCI

CTINLBLOR

PWLIXGMPI

RYOQVUHNA

GGQLHLIDN

GGVQYRXAU

ZWBGOORDA

DDEFRXZTC

NUCHPAJZT

BYDRQJCIE

TQXIXNMMS

ZGEJRZCMS

ZTLAVOYHN

KOGVJJFLB

CJFFKTDSM

KHMLPPYHK

ULQBGTMLX

VZHJERAQY

ELGFGWSVF

ALWYTMPVY

DXCNLIRAN

EYAVUQMVZ

LCLPEEXWJ

AEGLTJVVE

MNBQOEXQK

WGIDRBAAM

QHZUWCLUX

OONFIBBKD

JGVVTHHDQ

PCRNYORHH

RYNBKDPCC

CQLJVHXQJ

OLJSQQSSB

EYQOTGCVA

YWOMEOELO

查看完整回答
反对 回复 2021-10-22
?
西兰花伟大炮

TA贡献376条经验 获得超318个赞

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style>
            html,body{margin: 0;height: 100%;}    
            /*不加html会出现中间内容区域高度塌陷*/
            .left, .right{
                position: absolute;
                top: 0;
                height: 100%;
                width: 200px;
            }
            .left{left: 0;background-color: #FF8C00;}
            .right{right: 0;background-color: lightpink;}
            .main{margin: 0 210px;background-color: #1E90FF;height:100%;}
        </style>
    </head>
    <body>
        <div class="left">我是左边部分</div>
        <div class="right">我是右边部分</div>
        <div class="main">我是内容部分</div>
    </body>
</html>


查看完整回答
反对 回复 2017-04-19
  • qq_小寒
    qq_小寒
    不好意思,我希望的效果是main中包含左中右三部分
  • 西兰花伟大炮
    西兰花伟大炮
    什么都要给你写好,不太合适吧,稍微迁移一下就行了,得自己动手吧
  • 1 回答
  • 0 关注
  • 1126 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信