jQuery顶部大图定时缩为可关闭代码
以上只是部份演示图片,详细可以付费购买。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>jQuery顶部大图定时缩为可关闭代码</title>
<link rel="stylesheet" type="text/css" href="//xcdn.php.cn/js/ads/jQuery顶部大图定时缩为可关闭代码/css/zzsc.css"/>
<script language="javascript" src="//xcdn.php.cn/js/ads/jQuery顶部大图定时缩为可关闭代码/js/jquery.js"></script>
</head>
<body>
<script type="text/javascript">
/*
* 宽窄屏切换
* */
var bigscreen = false;
if ( screen.width>=1200 ) {
bigscreen = true;
var bodyTag = document.getElementsByTagName("body"),
bodyClassName = bodyTag.getAttribute("className") || bodyTag.getAttribute("class");
bodyClassName = bodyClassName ? bodyClassName+" " : "";
bodyTag.className = bodyClassName+"root1200";
}
</script>
<div class="wrapper" id="snActive-wrap">
<em title="关闭广告">Close</em>
<a target="_blank" name="redbaby_none_ggw_dt01" title="小图" href="跳转域名"></a>
<a target="_blank" name="redbaby_none_ggw_dt01" title="大图" href="跳转域名"></a>
</div>
<script type="text/javascript">
~function (){
var snActive = window.snActive = document.getElementById("snActive-wrap"),
a = snActive.getElementsByTagName("a"),
h = 0, w, imgSrc = [];
if (bigscreen){
w = 1190;
imgSrc = "//xcdn.php.cn/js/ads/jQuery顶部大图定时缩为可关闭代码/images/1390124030537_1200.jpg";// 40
imgSrc = "//xcdn.php.cn/js/ads/jQuery顶部大图定时缩为可关闭代码/images/1390124049068_1200.jpg";//500
} else {
w = 990;
imgSrc = "//xcdn.php.cn/js/ads/jQuery顶部大图定时缩为可关闭代码/images/1390124028186.jpg";// 40
imgSrc = "//xcdn.php.cn/js/ads/jQuery顶部大图定时缩为可关闭代码/images/1390124043025.jpg";//500
}
snActive.style.overflow = 'hidden';
a.style.display = "none";
a.innerHTML += '<img width="' + w + '" height="40" src="' + imgSrc + '" style="display:block" />';
if(a){
a.innerHTML += '<img width="' + w + '" height="500" src="' + imgSrc + '" style="display:block" />';
}
}();
//关闭通栏广告
var snActive = $(snActive),
hideImg = snActive.find('a:hidden'),
em = snActive.find("em");
timeout = !1;
if(hideImg) {
timeout = setTimeout(function(){
snActive.animate({height:40},600,function(){
hideImg.siblings('a:visible').hide();
hideImg.show();
em.show().live("click",function(){
snActive.slideUp(300);
});
});
}, 3000)
}
</script>
<div style="text-align:center;clear:both">
<p>适用浏览器:IE8、360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗.</p>
<p>来源:<a href="https://www.niuniubbs.com/" target="_blank">牛牛论坛</a></p>
</div>
</body>
</html>
以上代码中的图片和JS,请下载到自己网站目录中使用!
页:
[1]