gpt4 book ai didi

html - CSS 固定标题

转载 作者:行者123 更新时间:2023-11-28 10:36:43 25 4
gpt4 key购买 nike

<分区>

我正在尝试将标题固定在顶部。我看过其他帖子,并确定我做对了。这是 header 的 CSS:

.header{
width: 100%;
position:fixed;
top: 0px;
}

出于某种原因,当我这样做时,标题消失了。为什么有任何想法?我应该如何更改代码?仅供引用,我正在使用 Bootstrap 并将其添加到其中。

非常感谢,Stefan

看到这样的回答后,我做了这样的编辑,但它又在我身上消失了。我使用的 CSS 是:

position: fixed; 
width:960px;

还有帮助吗?非常感谢。

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