aspx页面上的水印

时间:2013-10-26 13:00:31

标签: asp.net watermark

我想在我的网站上添加图像作为水印。我准备了一个母版页,我希望将它自己包含在母版页中,以便在整个网站上实现。

我想这样一种方式,即滚动图像时应保持稳定,同时内容随滚动一起移动。

我基本上做了什么 在我的CSS中

.Watermark
{
    position:   absolute;
    left:       expression(this.offsetParent.scrollLeft + 180);
    top:        expression(this.offsetParent.scrollTop + 320);
    z-index:    99;
}

并在母版页的内容持有者中

<img src="./images/watermark.gif" mce_src="./images/watermark.gif" class="Watermark" style="opacity:0.2;filter:alpha(opacity=20);">

1 个答案:

答案 0 :(得分:1)

您应该使用position: fixed