如何在文章指定位置添加广告

大部分的网站将广告添加在文章的前面或后面,但读者已经熟悉这种做法,往往对这样的位置视而不见,为了将广告与内容合理搭配,我们建议将广告代码放到文章内容的中底部。

为了将广告代码放置到文章内容中间,并且考虑到广告代码在未来可能会有变更,我们将广告代码放置到<iframe>中。
方法:

  1. 将广告代码保存成.html格式,例如ads-300-250.html。
  2.  发表文章时,在需要显示广告位置的地方添加<ifrme src=”ads-300-250.html” id=”ads-300-250″ width=”300px” height=”250px” border=”none”></ifrme>。
  3. 定义ads-300-250 的样式,例如#ads-300-250{float:left; margin:20px;}。
  4. 当需要更新广告代码时,只需要更新ads-300-250.html中的广告代码即可。

4 Comments

  1. 流量计 says:

    博主写的不错,受益匪浅,学习了

  2. 我在网易新闻看到的,效果很不错。

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:wink: :-| :-x :twisted: :) 8-O :( :roll: :-P :oops: :-o :mrgreen: :lol: :idea: :-D :evil: :cry: 8) :arrow: :-? :?: :!:

无觅相关文章插件,快速提升流量

任鸟飞网页设计博客 谜题推理 No.1 Web Design Gallery IndustryIdea LookForDesign AWebGallery Mobile Web Template iDesign Wallpaper Big Funny Picture iPhone Faves iPhone Mobi iPad Faves Android Faves BlackBerry Faves Best Design Magazine All Banner Templates Blog Earn Tips 是谁啊 只爱美人 家乡美 唯美爱 美人衣妆 AutoCAD 2D | Pro/E 3D江苏名企The HTML5 Templates