如何制作像这个网站那样的背景图片?
http://disney.pageonewebsolutions.com/
This website background image perfectly fit to his div.
I was wondering if anyone can help me to create the site like this.
Appreciate any reply.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只需看一下背景的 CSS:
“中心”就起到了作用:它使背景始终位于中心。
Just take a look at the CSS for the background:
The "center" does the trick: it makes the background always stay in the centre.
应用背景图像
使用以下 CSS
body { background: #fcc900 url(../images/background.jpg) no-repeat top center; ;
top 和
center
关键字确保背景图像始终显示在屏幕的顶部中心,并且图像本身可能是使用容器创建的牢记div
,为内容保留正确的尺寸。如果您仍然不确定如何实现这些效果,请查看源代码并尝试将您找到的技术应用到您自己的设计中。
The background image is applied using the following CSS
body { background: #fcc900 url(../images/background.jpg) no-repeat top center; }
The
top
andcenter
keywords make sure that the background image is always displayed in the top-center of the screen and image itself was probably created with the containerdiv
in mind, leaving the correct dimensions free for the content.If you still unsure about how to achieve these effects, view the source and try and apply the techniques you find to your own design.
通过在背景图像上使用
?
By using
<center>
on the background image?