网页中的滚动条和背景图片设置 [英] a scrollbar in a web page and background picture setting

查看:278
本文介绍了网页中的滚动条和背景图片设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!我想在网页中设计滚动条以放置通知或其他内容。此外,背景图片是动态的。我该怎么办?我需要一些提示。谢谢!

Hello!I want to design a scrollbar in a web page to put notices or something. Also, the background picture is dynamic. What should I do? I need some tips. Thanks!

推荐答案

问题根本不清楚,但我可能知道你想要有一些背景,当你滚动页面时不会滚动。解决方案是为元素 html body 创建一个非常特殊的背景图像属性。它看起来像这样:



The question is not clear at all, but probably I understood that you want to have some background which does not scroll when you scroll you page. The solution is to make a pretty special background image property for the elements html and body. It can look something like this:

html body {
    background: url("myBackgroundImage.png") fixed no-repeat center top; 
}





这种设计的问题是图像具有固定的大小,但页面没有,因此您可以从侧面或底部(在这种情况下)跳出图像大小。我会说,当你为大图像使用这种非滚动的非重复背景图像时,这不是最好的想法:你不能保证这样的图像会填满页面。我正在使用这种设计来标记具有小版权/徽标图像(或其他类似图像)的页面,这些图像位于页面的相同位置,并且不会滚动出来。



如需其他选择,请参阅: http://www.w3schools.com/ css / css_background.asp [ ^ ]。



-SA


如果这是我认为你的意思,那么你应该考虑使用Ajax。

这里你可以找到预编程的工具包。



此处这里你可以找到一个使用它的啧啧
If it is what I think you mean, then you should consider using Ajax.
here you can find preprogrammed toolkits.

Here and here you can find a tut to use it


这篇关于网页中的滚动条和背景图片设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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