标签:dem 超过 cache x11 src 12px 需要 决定 100%
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
|
<!DOCTYPE html> < html > < head > < meta charset = "utf-8" > < title >hangge.com</ title > < style > html, body, div, span, h1, h2, h3 { margin: 0; padding: 0; border: 0; } .demo { width: 100vw; font-size: 5vw; margin: 0 auto;
color: #FFF; } .demo2 { width: 80vw; font-size: 5vw; margin: 0 auto;
} .demo3 { width: 50vw; height: 50vh; font-size: 1vw; margin: 0 auto;
color: #FFF; } </ style > </ head > < body > < div class = "demo" > < h1 >宽度100%, 字体5%</ h1 > </ div > < div class = "demo2" > < h2 >宽度80%, 字体5%</ h2 > </ div > < div class = "demo3" > < h3 >宽度50%, 高度50%, 字体1%</ h3 > </ div > </ body > </ 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
|
<!DOCTYPE html> < html > < head > < meta charset = "utf-8" > < title >hangge.com</ title > < style > html, body, div, span, button { margin: 0; padding: 0; border: 0; } button { width: 120px; height: 30px; color: #FFFFFF; font-family: "微软雅黑"; font-size: 14px; background: #28B995; } #mask { width: 100vw; height: 100vh; position: fixed; top: 0; left: 0; background: #000000; opacity: 0.5; display: none; } </ style > </ head > < body > < button onclick = "document.getElementById(‘mask‘).style.display=‘inline‘" >点击显示遮罩</ button > < div id = "mask" onclick = "document.getElementById(‘mask‘).style.display=‘none‘" /></ div > </ body > </ 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
84
85
|
<!DOCTYPE html> < html > < head > < meta charset = "utf-8" > < title >hangge.com</ title > < script type = "text/javascript" src = "js/jquery.js" ></ script > < style > html, body, div, span, button { margin: 0; padding: 0; border: 0; } button { width: 120px; height: 30px; color: #FFFFFF; font-family: "微软雅黑"; font-size: 14px; background: #28B995; } .dialog-container { display: none; width: 100vw; height: 100vh;
text-align: center; position: fixed; top: 0; left: 0; z-index: 10; } .dialog-container:after { display: inline-block; content: ‘‘; width: 0; height: 100%; vertical-align: middle; } .dialog-box { display: inline-block; border: 1px solid #ccc; text-align: left; vertical-align: middle; position: relative; } .dialog-title { line-height: 28px; padding-left: 5px; padding-right: 5px; border-bottom: 1px solid #ccc;
font-size: 12px; text-align: left; } .dialog-close { position: absolute; top: 5px; right: 5px; font-size: 12px; } .dialog-body {
} </ style > </ head > < body > < button onclick = "$(‘#dialogContainer‘).show();" >点击显示弹出框</ button > < div id = "dialogContainer" class = "dialog-container" > < div class = "dialog-box" > < div class = "dialog-title" >居中弹出框</ div > < a onclick = "$(‘#dialogContainer‘).hide();" class = "dialog-close" >关闭</ a > < div class = "dialog-body" > < img src = "logo.png" class = "demo-image" /> </ div > </ div > </ div > </ body > </ 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
|
<!DOCTYPE html> < html > < head > < meta charset = "utf-8" > < title >hangge.com</ title > < script type = "text/javascript" src = "js/jquery.js" ></ script > < style > html, body, div, span, button { margin: 0; padding: 0; border: 0; } button { width: 120px; height: 30px; color: #FFFFFF; font-family: "微软雅黑"; font-size: 14px; background: #28B995; } .dialog-container { display: none; width: 100vw; height: 100vh;
text-align: center; position: fixed; top: 0; left: 0; z-index: 10; } .dialog-box { top:10vh; left:10vw; width: 80vw; height: 80vh; text-align: left; position: absolute; border: 1px solid #ccc; display: flex; flex-direction: column; } .dialog-title { line-height: 28px; padding-left: 5px; padding-right: 5px; border-bottom: 1px solid #ccc;
font-size: 12px; text-align: left; } .dialog-close { position: absolute; top: 5px; right: 5px; font-size: 12px; } .dialog-body {
flex:1; overflow: auto; } </ style > </ head > < body > < button onclick = "$(‘#dialogContainer‘).show();" >点击显示弹出框</ button > < div id = "dialogContainer" class = "dialog-container" > < div class = "dialog-box" > < div class = "dialog-title" >居中弹出框</ div > < a onclick = "$(‘#dialogContainer‘).hide();" class = "dialog-close" >关闭</ a > < div class = "dialog-body" > < img src = "logo.png" class = "demo-image" /> </ div > </ div > </ div > </ body > </ 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
|
<!DOCTYPE html> < html > < head > < meta charset = "utf-8" > < title >hangge.com</ title > < script type = "text/javascript" src = "js/jquery.js" ></ script > < style > html, body, div, span, button { margin: 0; padding: 0; border: 0; } button { width: 120px; height: 30px; color: #FFFFFF; font-family: "微软雅黑"; font-size: 14px; background: #28B995; } .dialog-container { display: none; width: 100vw; height: 100vh;
text-align: center; position: fixed; top: 0; left: 0; z-index: 10; } .dialog-container:after { display: inline-block; content: ‘‘; width: 0; height: 100%; vertical-align: middle; } .dialog-box { display: inline-block; text-align: left; vertical-align: middle; position: relative; } .demo-image { max-width: 90vw; max-height: 90vh; } </ style > </ head > < body > < button onclick = "$(‘#dialogContainer‘).show();" >点击显示大图</ button > < div id = "dialogContainer" class = "dialog-container" onclick = "$(‘#dialogContainer‘).hide();" > < div class = "dialog-box" > < img src = "image.jpg" class = "demo-image" /> </ div > </ div > </ body > </ 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
|
<!DOCTYPE html> < html > < head > < meta charset = "utf-8" > < title >hangge.com</ title > < script type = "text/javascript" src = "js/jquery.js" ></ script > < style > html, body, div, span, button { margin: 0; padding: 0; border: 0; } body {
} page { display: block; height: 98vh; width: 69.3vh; margin: 1vh auto; padding: 12vh; border: 1px solid #646464; box-shadow: 0 0 15px rgba(0,0,0,.75); box-sizing: border-box;
position: relative; } page:after { content: attr(data-page); color: graytext; font-size: 12px; text-align: center; bottom: 4vh; position: absolute; left: 10vh; right: 10vh; } a { color: #34538b; font-size: 14px; } </ style > < script type = "text/javascript" > $(document).ready(function(){ var lenPage = $("page").length; //自动添加每页底部的页码 $("page").each(function(i){ $(this).attr("data-page", "第 "+ (i+1) +" 页,共 "+ lenPage +" 页"); }); }); </ script > </ head > < body > < page ></ page > < page ></ page > </ body > </ html > |
原文出自:www.hangge.com 转载请保留原文链接:http://www.hangge.com/blog/cache/detail_1715.html
标签:dem 超过 cache x11 src 12px 需要 决定 100%
原文地址:https://www.cnblogs.com/Tohold/p/10362279.html