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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
| @media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) { .iphoneTop .indexTop, .iphoneTop .liveTop, .iphoneTop .navBar{ padding-top: 44px;} .betBottomBar,.messageFixed{ bottom: 34px;} .iphoneTop .fixed_top_bar .title{ margin-top: 44px;} }
.content-bg{background: url(../images/bg_repeat.jpg) repeat-y;background-size: 100% auto;}
html::-webkit-scrollBar{display:none;}
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:-webkit-autofill:active { -webkit-box-shadow: 0 0 0px 1000px transition: background-color 50000s ease-in-out 0s, color 5000s ease-in-out 0s; }
input:-webkit-autofill { -webkit-animation: autofill-fix 1s infinite; } @-webkit-keyframes autofill-fix { from { background-color: transparent } to { background-color: transparent } }
.spinner{ -webkit-animation: spin 1s linear 1s 5 alternate; animation: spin 1s linear infinite; display: inline-block; } @-webkit-keyframes spin { from { -webkit-transform: rotate(0deg); } to { -webkit-transform: rotate(360deg); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
declare var window:any; initWinPage(){ this.restWinPage(window, window.lib || (window.lib = {})); }
private restWinPage(N, M) { function L() { let a = I.getBoundingClientRect().width; a / F > 540 && (a = 540 * F); let d = a / 7.5; I.style.fontSize = d + "px", D.rem = N.rem = d }
let K, J = N.document, I = J.documentElement, H = J.querySelector('meta[name="viewport"]'), G = J.querySelector('meta[name="flexible"]'), F = 0, E = 0, D = M.flexible || (M.flexible = {}); if (H) { // console.warn("将根据已有的meta标签来设置缩放比例"); let C = H.getAttribute("content").match(/initial\-scale=([\d\.]+)/); C && (E = parseFloat(C[1]), F = parseInt(''+1 / E)) } else { if (G) { let B = G.getAttribute("content"); if (B) { let A = B.match(/initial\-dpr=([\d\.]+)/), z = B.match(/maximum\-dpr=([\d\.]+)/); A && (F = parseFloat(A[1]), E = parseFloat((1 / F).toFixed(2))), z && (F = parseFloat(z[1]), E = parseFloat((1 / F).toFixed(2))) } } } if (!F && !E) { let y = N.navigator.userAgent, x = (!!y.match(/android/gi) && !!y.match(/iphone/gi)), w = x && !!y.match(/OS 9_3/), v = N.devicePixelRatio; F = x ? v >= 3 && (!F || F >= 3) ? 3 : v >= 2 && (!F || F >= 2) ? 2 : 1 : 1, E = 1 / F } if (I.setAttribute("data-dpr", F), !H) { if (H = J.createElement("meta"), H.setAttribute("name", "viewport"), H.setAttribute("content", "initial-scale=" + E + ", maximum-scale=" + E + ", minimum-scale=" + E + ", user-scalable=no"), I.firstElementChild) { I.firstElementChild.appendChild(H) } else { let u = J.createElement("div"); u.appendChild(H), J.write(u.innerHTML) } } N.addEventListener("resize", function () { clearTimeout(K), K = setTimeout(L, 300) }, !1), N.addEventListener("pageshow", function (b) { b.persisted && (clearTimeout(K), K = setTimeout(L, 300)) }, !1), "complete" === J.readyState ? J.body.style.fontSize = 12 * F + "px" : J.addEventListener("DOMContentLoaded", function () { J.body.style.fontSize = 12 * F + "px" }, !1), L(), D.dpr = N.dpr = F, D.refreshRem = L, D.rem2px = function (d) { let c:any = parseFloat(d) * this.rem; return "string" == typeof d && d.match(/rem$/) && (c += "px"), c }, D.px2rem = function (d) { let c:any = parseFloat(d) / this.rem; return "string" == typeof d && d.match(/px$/) && (c += "rem"), c } }
-webkit-transform: scaleY(0.7);//Y轴方向,缩放0.6倍 -webkit-transform-origin: 100% 100%;//缩放在右下角对齐 margin-top: -50px;//负值margin从而把其位置摆正确,有时需要放到包在div的外面 margin-left: -95px;//如果用scale全部缩放,需要设置这个值
[style.marginTop.px]="cartoonHeight*0.2*-1" [style.marginLeft.px]="cartoonWidth*0.2*-1" style="transform: scale(0.8);-webkit-transform: scale(0.8);-webkit-transform-origin: 100% 100%;"
|