在整个网页上覆盖图像 [英] Overlaying a Image over a whole web page

查看:66
本文介绍了在整个网页上覆盖图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在整个网页上覆盖重复的图像?如果是,怎么办?

Is it possible to overlay a repeating image over a entire web page? If so, How?

推荐答案

类似这样的东西:

HTML

<div class="overlay"></div>

CSS

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("image.png") repeat;
}

您可能希望将div放在html的最后,以确保它位于页面上所有其他内容之上,或者您可以使用z-indexing。

You probably want to put the div at the very end of the html to ensure it's above everything else on the page, alternatively you could use z-indexing.

这篇关于在整个网页上覆盖图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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