文章两侧水印
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="Cache-Control" content="no-transform ">
<meta content="IE=edge, chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<!--[if lt IE 7]>
<html class="ie6"><![endif]--><!--[if IE 7]>
<html class="ie7"><![endif]--><!--[if IE 8]>
<html class="ie8"><![endif]--><!--[if gte IE 9]>
<html class="ie9"><![endif]-->
<meta http-equiv="Cache-Control" content="no-siteapp"/>
<meta name="mobile-agent" content="format=html5; url=">
<title>水印广告</title>
<meta name="description" content="水印广告" >
<meta name="keywords" content="水印广告" >
<meta name="applicable-device" content="pc">
<meta property="og:type" content="news"/>
<meta property="og:title" content="水印广告"/>
<meta property="og:description" content="水印广告"/>
<meta property="og:image" content=""/>
<meta property="og:url" content=""/>
<meta property="og:release_date" content="2018-11-03 11:38:17"/>
<link rel="alternate" media="only screen and (max-width: 640px)" href="" />
<link rel="canonical" href="" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<script src="//tianqi.eastday.com/jscss/v27/js/lib/jquery183.js"></script>
<style type="text/css">
html, body {
padding: 0;
margin: 0px;
height: 100%;
}
.detail_cnt {
height: 100%;
overflow: hidden;
}
.ssy_icon {
position: absolute;
right: 100px;
top: 30px;
width: 30px;
height: 32px;
z-index: 999;
background: url("//mini.eastday.com/assets/images/11/close_sp.png");
background-position: 0px -18px;
background-repeat: no-repeat;
cursor: pointer;
display: none;
}
.ssy_icon .ssy_close {
display: block;
width: 30px;
height: 32px;
}
.ssy_left {
position: absolute;
width: 360px;
display: inline;
z-index: 0;
left: 0;
top: 20px;
overflow: hidden;
position: fixed;
}
.ssy_l {
position: absolute;
display: inline;
z-index: 0;
right: 0;
top: 0;
}
.ssy_right {
position: absolute;
width: 360px;
display: inline; /*z-index: 99;*/
z-index: 0;
right: 15px;
top: 20px;
overflow: hidden;
position: fixed;
}
.ssy_r {
position: absolute;
display: inline;
z-index: 99;
left: 0;
top: 0;
}
.ssy_left .ssy_let_odd {
float: right;
}
.ssy_left .ssy_let_even {
float: right;
}
.ssy_left .ssy_let_odd .ssy_bg_l {
float: right;
}
.ssy_left .ssy_let_even .ssy_bg_k {
float: right;
}
.ssy_left .ssy_let_even .ssy_bg_l {
float: right;
}
.ssy_left .ssy_let_odd .ssy_bg_k {
float: right;
}
.ssy_let_odd {
display: inline;
height: 120px;
overflow: hidden;
margin-right: -15px;
}
.ssy_let_odd a {
float: left;
display: block;
width: 120px;
height: 110px;
background-repeat: no-repeat;
background-position: center center;
cursor: pointer;
}
.ssy_let_odd .ssy_bg_k {
background-image: url("//tianqi.eastday.com/jscss/v27/img/1111/ju1.png");
}
.ssy_let_odd .ssy_bg_k:hover {
background-image: url("//tianqi.eastday.com/jscss/v27/img/1111/ju2.png");
}
.ssy_let_odd .ssy_bg_l {
background-image: url("//tianqi.eastday.com/jscss/v27/img/1111/zhu1.png");
}
.ssy_let_odd .ssy_bg_l:hover {
background-image: url("//tianqi.eastday.com/jscss/v27/img/1111/zhu2.png");
}
.ssy_left .ssy_let_even {
display: inline;
height: 120px;
margin-right: 40px;
overflow: hidden;
}
.ssy_let_even a {
float: left;
display: block;
width: 120px;
height: 110px;
background-repeat: no-repeat;
background-position: center center;
cursor: pointer;
}
.ssy_let_even .ssy_bg_k {
background-image: url("//tianqi.eastday.com/jscss/v27/img/1111/ju1.png");
}
.ssy_let_even .ssy_bg_k:hover {
background-image: url("//tianqi.eastday.com/jscss/v27/img/1111/ju2.png");
}
.ssy_let_even .ssy_bg_l {
background-image: url("//tianqi.eastday.com/jscss/v27/img/1111/zhu1.png");
}
.ssy_let_even .ssy_bg_l:hover {
background-image: url("//tianqi.eastday.com/jscss/v27/img/1111/zhu2.png");
}
.ssy_right .ssy_let_even {
display: inline;
height: 120px;
overflow: hidden;
}
.ssy_right .ssy_let_odd {
display: inline;
height: 120px;
margin-left: 30px;
overflow: hidden;
}
@media screen and (max-width:1400px) {
.ssy_left {
position: absolute;
width: 120px;
display: inline;
z-index: 0;
left: 0;
top: 20px;
overflow: hidden;
position: fixed;
}
.ssy_right {
position: absolute;
width: 120px;
display: inline; /*z-index: 99;*/
z-index: 0;
right: 20px;
top: 20px;
overflow: hidden;
position: fixed;
}
}
</style>
</head>
<body>
<div class="wrap detail_cnt" id="wrap"></div>
</body>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<script>
////************************************************** 纯净版双十一水印广告//***********************************
$(function() {
$('.detail_cnt').append(
'<div class="ssy_left"><div class="ssy_l"></div></div>' +
'<div class="ssy_right"><div class="ssy_r"></div></div>' +
'<div class="ssy_icon"><a class="ssy_close" id="index_close_xqshuiyin1" href="javascript:;" updata="detail|sy_close|0|0"></a></div>'
);
var detailcntHeight = $('.detail_cnt').height();
var detailcntWidth = $(document).width();
$(".ssy_left,.ssy_right").css({
"height": (detailcntHeight + 8) + "px"
});
$(".ssy_l,.ssy_r").css({
"height": detailcntHeight + "px"
});
function onResize(cntWidth, cntHeight) {
// $("body").css({
// "overflow-x": "hidden"
// });
var sureHeight = $('.detail_cnt').height() / 120,
winWidth = $(document).width(),
sureWidth = parseInt((winWidth - 1000) / 2),
yWidth = Math.ceil((sureWidth) / 130),
sidebarWidth = yWidth * 130,
sidebarOffset = sureWidth - yWidth * 130;
for (var i = 0; i < sureHeight; i++) {
if (i % 2 == 0) {
$('.ssy_l').append(
'<div class="ssy_let_even fl clearfix"></div>'
)
$('.ssy_r').append(
'<div class="ssy_let_even fl clearfix"></div>'
)
} else {
$('.ssy_l').append(
'<div class="ssy_let_odd fl clearfix"></div>'
)
$('.ssy_r').append(
'<div class="ssy_let_odd fl clearfix"></div>'
)
}
}
$('.sy_left').css({
'width': sidebarWidth,
'left': sidebarOffset
});
$('.sy_right').css({
'width': sidebarWidth,
'right': sidebarOffset
});
for (var i = 0; i < yWidth; i++) {
if (i % 2 == 0) {
$('.ssy_let_odd').append(
'<a class="ssy_bg_k"></a>'
)
$('.ssy_let_even').append(
'<a class="ssy_bg_l" ></a>'
)
} else {
$('.ssy_let_even').append(
'<a class="ssy_bg_k" ></a>'
)
$('.ssy_let_odd').append(
'<a class="ssy_bg_l" ></a>'
)
}
}
}
$(window).resize(function() {
console.log(0);
var cntWidth = $(document).width();
var cntHeight = $(document).height();
if (detailcntWidth >= cntWidth) {
return;
}
detailcntWidth = cntWidth;
onResize(cntWidth, cntHeight);
});
onResize(detailcntWidth, detailcntHeight + 350);
$('.detail_cnt').on('click', '.ssy_bg_k', function() {
window.open('https://s.click.taobao.com/t?e=m%3D2%26s%3DQAbAwTliZk0cQipKwQzePCperVdZeJviEViQ0P1Vf2kguMN8XjClAqAi1QCo%2Bi%2F82pw5J%2Fu62vHXO%2BqAgJq5vIWMeNBkfrgUHgonOOy2FCxE5qQkiwVPdW6r913w8D2lAgLbN2peQYN8isIqg9litAZn%2By0keumo6IAZ7GnWxJ8j5Wjhls5eJF2jD138wP5d'); //聚划算
});
$('.detail_cnt').on('click', '.ssy_bg_l', function() {
window.open('https://s.click.taobao.com/t?e=m%3D2%26s%3D0aCSMTUAfUccQipKwQzePCperVdZeJviK7Vc7tFgwiFRAdhuF14FMae9GrRojl015x%2BIUlGKNpVw2vhzO6hQaM8W0vxkbX1bkrYIzoeujB5TfPQaZHJ33k5U%2BEi82A4gU9jONtfgAYE735YeP4ao%2FPQho7GrRW4P5MRYl0%2FyOZF1MS4Hkrwwa%2BQu%2FWc2GdjP8HTPyqWu%2F6Ov7%2BIzlFsQSV7tq5jQc9hazOVMRxaE72YKaG3sZf8f2Q%3D%3D'); //淘宝
});
$('.ssy_close').on("click", function() {
$('.ssy_left,.ssy_right').hide();
$(this).parent('.ssy_icon').hide();
});
})
////************************************************** 广告上报//***********************************
var common = {
browser: function() {
var agent = navigator.userAgent.toLowerCase();
var browser_type = "";
if (agent.indexOf("msie") > 0) {
browser_type = "IE";
}
if (agent.indexOf("firefox") > 0) {
browser_type = "firefox";
}
if (agent.indexOf("chrome") > 0 && agent.indexOf("mb2345browser") < 0 && agent.indexOf("360 aphone browser") < 0) {
browser_type = "chrome";
}
if (agent.indexOf("360 aphone browser") > 0 || agent.indexOf("qhbrowser") > 0) {
browser_type = "360";
}
if (agent.indexOf("ucbrowser") > 0) {
browser_type = "UC";
}
if (agent.indexOf("micromessenger") > 0) {
browser_type = "WeChat";
}
if ((agent.indexOf("mqqbrowser") > 0 || agent.indexOf("qq") > 0) && agent.indexOf("micromessenger") < 0) {
browser_type = "QQ";
}
if (agent.indexOf("miuibrowser") > 0) {
browser_type = "MIUI";
}
if (agent.indexOf("mb2345browser") > 0) {
browser_type = "2345";
}
if (agent.indexOf("sogoumobilebrowser") > 0) {
browser_type = "sogou";
}
if (agent.indexOf("liebaofast") > 0) {
browser_type = "liebao";
}
if (agent.indexOf("safari") > 0 && agent.indexOf("chrome") < 0 && agent.indexOf("ucbrowser") < 0 && agent.indexOf("micromessenger") < 0 && agent.indexOf("mqqbrowser") < 0 && agent.indexOf("miuibrowser") < 0 && agent.indexOf("mb2345browser") < 0 && agent.indexOf("sogoumobilebrowser") < 0 && agent.indexOf("liebaofast") < 0 && agent.indexOf("qhbrowser") < 0) {
browser_type = "safari";
}
return browser_type;
}, //浏览器
detectOS: function() {
var sUserAgent = navigator.userAgent;
var isWin = (navigator.platform === "Win32") || (navigator.platform === "Windows");
var isMac = (navigator.platform === "Mac68K") || (navigator.platform === "MacPPC") || (navigator.platform === "Macintosh") || (navigator.platform === "MacIntel");
var bIsIpad = sUserAgent.match(/ipad/i) === "ipad";
var bIsIphoneOs = sUserAgent.match(/iphone os/i) === "iphone os";
var isUnix = (navigator.platform === "X11") && !isWin && !isMac;
var isLinux = (String(navigator.platform).indexOf("Linux") > -1);
var bIsAndroid = sUserAgent.toLowerCase().match(/android/i) === "android";
var bIsCE = sUserAgent.match(/windows ce/i) === "windows ce";
var bIsWM = sUserAgent.match(/windows mobile/i) === "windows mobile";
if (isMac) return "Mac";
if (isUnix) return "Unix";
if (isLinux) {
if (bIsAndroid) {
return "Android";
} else {
return "Linux";
}
}
if (bIsCE || bIsWM) {
return 'wm';
}
if (sUserAgent) {
var isWin2K = sUserAgent.indexOf("Windows NT 5.0") > -1 || sUserAgent.indexOf("Windows 2000") > -1;
if (isWin2K) return "Win2000";
var isWinXP = sUserAgent.indexOf("Windows NT 5.1") > -1 || sUserAgent.indexOf("Windows XP") > -1;
if (isWinXP) return "WinXP";
var isWin2003 = sUserAgent.indexOf("Windows NT 5.2") > -1 || sUserAgent.indexOf("Windows 2003") > -1;
if (isWin2003) return "Win2003";
var isWinVista = sUserAgent.indexOf("Windows NT 6.0") > -1 || sUserAgent.indexOf("Windows Vista") > -1;
if (isWinVista) return "WinVista";
var isWin7 = sUserAgent.indexOf("Windows NT 6.1") > -1 || sUserAgent.indexOf("Windows 7") > -1;
if (isWin7) return "Win7";
var isWin8 = sUserAgent.indexOf("Windows NT 6.2") > -1 || sUserAgent.indexOf("Windows 8") > -1;
if (isWin8) return "Win8";
var isWin10 = sUserAgent.indexOf("Windows NT 10.0") > -1 || sUserAgent.indexOf("Windows 10") > -1;
if (isWin10) return "Win10";
}
return "other";
}, //操作系统
pixel: function() {
var heightss = window.screen.height;
var widthss = window.screen.width;
var pixel = widthss + '×' + heightss;
return pixel;
}, //分辨率
iswifi: function() {
var ua = navigator.userAgent;
var networkStr = ua.match(/NetType\/\w+/) ? ua.match(/NetType\/\w+/)[0] : 'NetType/other';
networkStr = networkStr.toLowerCase().replace('nettype/', '');
var networkType;
switch (networkStr) {
case 'wifi':
networkType = 'wifi';
break;
case '4g':
networkType = '4g';
break;
case '3g':
networkType = '3g';
break;
case '3gnet':
networkType = '3g';
break;
case '2g':
networkType = '2g';
break;
default:
networkType = 'other';
}
return networkType;
}, ////网络环境(wifi、4g、3g、2g、other)
count: function() {
var c = 1;
// 当前浏览器是否支持localStorage
if (window.localStorage) {
// 是否已经有记录了,如果有进入操作
if (window.localStorage.getItem("count")) {
//拿出key对应的value, 因为存储进去的是字符串。
var c = parseInt(window.localStorage.getItem("count"));
// 设置key,value加1
window.localStorage.setItem("count", c + 1);
// console.log(c);
} else {
//如果没有检查到key, 那肯定没设置,那就让他默认为0
window.localStorage.setItem("count", 1);
}
}
return c
}, //展示存储浏览次数
}
$(function() {
var os = common.detectOS(); //操作系统
var browser = common.browser(); //浏览器
var pixel = common.pixel(); //分辨率
var position = returnCitySN["cname"].substring(0, 2); //地域
var iswifi = common.iswifi(); //网络环境(wifi、4g、3g、2g、other)
var aaaa = common.count();
console.log(os);
console.log(browser);
console.log(pixel);
console.log(position);
console.log(iswifi);
console.log(aaaa);
});
</script>
</html>