gpt4 book ai didi

CSS:添加位置后位置不正确:已修复;

转载 作者:太空宇宙 更新时间:2023-11-04 05:15:30 26 4
gpt4 key购买 nike

Correct

当前右侧的 div 位于正确的位置,我希望它在的位置。但是如果页面太长,我希望它滚动,所以我添加 position: fixed;

Incorrect

但现在完全不同了。我该如何解决这个问题?

JSfiddle with the code

最佳答案

尝试:

#right {
float: right;
width: 200px;
background: red;
position: fixed;
margin-left:620px;
}

我添加 620px 是因为您的左列有 600px,并且在您的 position: fixed 之前每列之间有 20px 的边距。

关于CSS:添加位置后位置不正确:已修复;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8248722/

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