gpt4 book ai didi

html - 如何将左列作为导航器,将右列作为正文?

转载 作者:行者123 更新时间:2023-11-28 03:53:05 24 4
gpt4 key购买 nike

如何将左栏设为navigator,右栏设为body?

<style>
#leftBodyVideo{
width: 45%;
display: inline-block;
}

#rightBodyVideo{
width: 45%;
display: inline-block;
}
</style>

<div id="leftBodyVideo">
<h5>Pyraminx ao12 16 46</h5>
<iframe width="560" height="315" src="https://www.youtube.com/embed/XDN9BXLFGhg" frameborder="0" allowfullscreen></iframe>

</div>

<div id="rightBodyVideo">
<h5>Lubing DaYan ZhanChi Cube</h5>
<iframe width="560" height="315" src="https://www.youtube.com/embed/ydg0APsB7IU" frameborder="0" allowfullscreen></iframe>

</div>

预期结果是这样的(对于文档模板):https://nodejs.org/docs/latest-v5.x/api/

最佳答案

您可以定位 div 并使用 overflow-y: scroll;

FIDDLE

代码如下:

div {
position: absolute;
left: 0;
top: 0;
bottom: 0;
overflow-y: scroll;
overflow-x: hidden;
height: 500px;
width: 200px;
}
<div>
1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/> 1
<br/>

</div>

关于html - 如何将左列作为导航器,将右列作为正文?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43625297/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com