-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebwatermark.html
executable file
·83 lines (79 loc) · 2.71 KB
/
webwatermark.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<html>
<head>
<meta http-equiv="Content-Type" name="viewport" content="text/html; charset=UTF-8">
<meta id="Viewport" name="viewport" width="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<style type="text/css" charset="utf-8">
body {
-webkit-tap-highlight-color: rgba(0,0,0,0);
margin:0px;
}
a {
-webkit-tap-highlight-color: #999;
tap-highlight-color: #999;
}
</style>
<script type="text/javascript">
function GetWidth()
{
var x = 0;
if (self.innerHeight)
{
x = self.innerWidth;
}
else if (document.documentElement && document.documentElement.clientHeight)
{
x = document.documentElement.clientWidth;
}
else if (document.body)
{
x = document.body.clientWidth;
}
return x;
}
function GetHeight()
{
var y = 0;
if (self.innerHeight)
{
y = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
{
y = document.documentElement.clientHeight;
}
else if (document.body)
{
y = document.body.clientHeight;
}
return y;
}
(function doInit(){
//alert(navigator.userAgent);
/*
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {
var windowWidth = GetWidth();
var ww = ( windowWidth < window.screen.width ) ? windowWidth : window.screen.width; //get proper width
var mw = 320; // min width of site
var ratio = ww / mw; //calculate ratio
if( ww < mw){ //smaller than minimum size
document.getElementById('Viewport').setAttribute('content', 'initial-scale=' + ratio + ', maximum-scale=' + ratio + ', minimum-scale=' + ratio + ', user-scalable=yes, width=' + ww);
}else{ //regular size
document.getElementById('Viewport').setAttribute('content', 'initial-scale=1.0, maximum-scale=2, minimum-scale=1.0, user-scalable=yes, width=' + ww);
}
//alert(document.getElementById('Viewport').outerHTML);
}
*/
} )();
</script>
</head>
<body>
<div style="background-color:green;">
<div style="text-align:center;margin-top:30px;">
<img src="webwatermark_files/description5-compress.jpg" style="width:280px;100px;">
</div>
<div style="text-align:center;margin-top:30px;">
<a href="http://www.qq.com"><img src="webwatermark_files/download1-4.png" style="width:277px;52px;"></a>
</div>
</div>
</body>
</html>