Html 对中固定割台
我正在处理我的投资组合: 我希望文本“Bryan Bell”能够居中显示,但在用户滚动时也能固定 实现这一目标的最佳方式是什么Html 对中固定割台,html,css,positioning,Html,Css,Positioning,我正在处理我的投资组合: 我希望文本“Bryan Bell”能够居中显示,但在用户滚动时也能固定 实现这一目标的最佳方式是什么 多谢各位 如果希望图像不在标题上方,请使用此选项 #header { position:fixed; text-align:center; width:100%; } .header { .... position: fixed; top: 0px; width: 100%; background-color: black;
多谢各位 如果希望图像不在标题上方,请使用此选项
#header {
position:fixed;
text-align:center;
width:100%;
}
.header {
....
position: fixed;
top: 0px;
width: 100%;
background-color: black;
z-index: 300;
}
.app1{
margin-top: 184px;
}
嘿,现在习惯了这个css*样式表*
.header
给位置固定
现在给左0
右0顶部0
并给z索引最大值
.header {
left: 0;
position: fixed;
right: 0;
text-align: center;
top: 0;
z-index: 999;
}
如果你不在问题中包含CSS(而不是链接),这将永远不会帮助其他人。@GeorgeStocker我现在意识到,这是一个n00b错误。我会添加它。@wesleymurch我本来打算添加CSS供其他人查看,但你关闭了它:[很好的尝试,但你仍然可以编辑问题来添加CSS。它是标签下面的“编辑”链接。如果你编辑它,请标记问题(或发表评论),我会看到它,然后为您重新打开它。那么这会使它位于标题下而不是顶部?