-1

做这样的事情可行吗?我想在我的博主博客中添加一个类似http://goo.gl/xSmwq的背景可点击图片(广告)?

你能帮我提供所需的代码吗?

先感谢您

4

1 回答 1

0

好吧,如果您看到没有背景可点击图像,则有一个位置固定的“透明图像”:

在此处输入图像描述

尝试放入您的级联样式表(CSS):

body {
background-image: url("http://banners.dol.gr/opap_skin_kathigitis_tovima.jpg");
background-repeat: no-repeat;
background-position: center 40PX;
background-attachment: fixed;
background-color: #000000 !important;
}
.background {position:absolute;top:0;left:0;z-index:999;visibility:hidden;overflow:hidden;width:100%;height:880px;}
.background .first-banner {position:fixed;left:50%;visibility:visible;margin-left:-800px;}

然后在您的html代码中:

<div class="background">
  <div class="first-banner">
    <a target="_blank" href="http://www.google.com">
      <img width="300" height="880" src="http://static.adman.gr/void.gif" border="0">
    </a>
  </div>
</div>

希望能帮助到你!:)

于 2013-01-25T17:44:56.343 回答