使标题贴在浏览器上 [英] Making the header stick to browser
本文介绍了使标题贴在浏览器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我有一个标题:
Hello,
I''ve a header :
div.banner {
margin:0px;
top: 0;
left: 0;
background-color: green;
width: 100%;
height:100px;
}
问题在于标头没有固定在浏览器的边界上(顶部和左侧).我该怎么做才能使此标头贴在他们身上?
The problem is that the header is not sticking to the boundaries of the browser (top and left). What do I do to get this header stick to them?
推荐答案
try:
try:
div.banner {
margin:0px;
top: 0;
left: 0;
background-color: green;
width: 100%;
height:100px;
position:fixed;
}
这篇关于使标题贴在浏览器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文