修复网页中的文字 [英] fixing text in webpage

查看:93
本文介绍了修复网页中的文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我的文本例如。 注册这是最上面的文本,是一个标题,保持固定在屏幕上,然后当我滚动注册应该保持完整在屏幕的顶部,所有其他文本应该在滚动时下面。我怎样才能做到这一点????请尽快回复...感谢所有提前给您的时间。

解决方案

我不确定我的理解正确你正在努力实现,但我会给它一个镜头。如果您尝试创建固定位置标题,则可以使用与固定页脚相同的技巧。您可以在固定页脚文档中找到更多信息。


$

 <! - 怪癖模式中的IE  - > b $ b 

以下是示例代码:
<!DOCTYPE HTML PUBLIC - // W3C // DTD HTML 4.0 // EN>
< title>固定页脚< / title>
< style type =text / css>
body {
margin:0;
padding:0 0< length> 0;
}
div#footer {
position:absolute;
bottom:0;
剩下:0;
宽度:100%;
height:< length>;
}
@media screen {
body> div#footer {
position:fixed;
}
}
* html body {
overflow:hidden;
}
* html div#content {
height:100%;
溢出:auto;
}
< / style>
< div id =footer>页脚< / div>
< div id =content>内容< / div>


i want that my text eg. "registration" which is the topmost text and is a heading,to remain fixed on the screen and then when i scroll "registration" should remain intact at the top of the screen and all other text should go beneath it while scrolling. how can i do this???? please reply soon... Thanks to all for your time in advance.

解决方案

I'm not sure do I understand correctly what you are trying to achive, but i'll give it a shot. If you are trying to create fixed position header you can use the same technique like in fixed footer. You can find more info in this fixed footer documentation

And here goes the example code:

<!-- IE in quirks mode -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<title>Fixed footer</title>
<style type="text/css">
 body{
  margin:0;
  padding:0 0 <length> 0;
 }
 div#footer{
  position:absolute;
  bottom:0;
  left:0;
  width:100%;
  height:<length>;
 }
 @media screen{
  body>div#footer{
   position: fixed;
  }
 }
 * html body{
  overflow:hidden;
 } 
 * html div#content{
  height:100%;
  overflow:auto;
 }
</style>
<div id="footer"> footer </div>
<div id="content"> content </div>

这篇关于修复网页中的文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆