我正在写我的作品集:www.bbellmedia.com/mywork
我希望文本‘布莱恩贝尔’居中它是如何,但也是固定的,当用户滚动。
实现这一目标的最佳方法是什么?
非常感谢!
发布于 2012-07-12 11:19:43
#header {
position:fixed;
text-align:center;
width:100%;
}
发布于 2012-07-12 11:29:00
如果你不想图像超出你的头顶,使用这个
.header {
....
position: fixed;
top: 0px;
width: 100%;
background-color: black;
z-index: 300;
}
.app1{
margin-top: 184px;
}
发布于 2012-07-12 12:02:05
嘿,现在习惯了css *样式表*
.header
给position fixed
,现在给left 0
right 0
top 0
,给z-index maximum
.header {
left: 0;
position: fixed;
right: 0;
text-align: center;
top: 0;
z-index: 999;
}
https://stackoverflow.com/questions/11444561
复制相似问题