首页 » 建站技术 » WordPress » 浏览内容
WordPress侧边栏广告展示实现方法
<!--调用 弹动插件--><script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.easing.1.3.js"></script> <!--结尾--><!--调用header--><script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/header.js"></script> <!--结尾-->
放到之前,前提当然是你加载了jQuery库
CSS式样
/*侧边栏广告*/#adbg{position:absolute;left:-203px; top:150px; background:url(images/ad.png) no-repeat; width:235px; height:231px;} #ad{ width:180px; height:150px; margin:63px 0 0 10px} * html #adbg { display:none; } /* IE6 */ *+html #adbg{ display:none;} /* IE7 */
广告代码放置 ,放在头部和底部都可以
<div id="adbg"> <div id="ad"> /* 博客广告展示 */ </div> </div>

js包含其他的效果,比如侧边栏标题平移,不用的精简下