css布局,左边的滚动时右边不随着滚动

<body>

   <div class="parent">

    <div class="leftChild"></div>

    <div class="rightChild"></div>

  </div>

</body>

body {width: 100%, height: 100%}

.parent {overflow: hidden; position:fixed; top:0; bottom:0; left:0; right:0}

.leftChild {float:left; overflow:auto; width:40%;height: 100%}

.leftChild {float:left; overflow:auto; width:60%; height: 100%}

后续还有更好的解决方案,会继续更新

猜你喜欢

转载自www.cnblogs.com/xiaominsweet/p/9186986.html
今日推荐