Skip to content

Commit 5201b95

Browse files
committed
代码兼容
1 parent de53167 commit 5201b95

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Art_Blog.zip

-2 Bytes
Binary file not shown.

dist/Art_Blog/common.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363

6464
<script>
6565
var win_width = 375;
66+
var deviation = document.querySelectorAll(".continar,.os-headertop");
6667
var setFontSize = function() {
6768
win_width = window.innerWidth;
6869
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) || win_width < 1200) {
@@ -75,9 +76,8 @@
7576
pro = 100
7677
}
7778
document.documentElement.style.setProperty("font-size", pro + "px");
78-
// document.documentElement.style.setProperty("transition", "font-size 0.15s");
79-
} else {
80-
documen.querySelectorAll(".continar,.os-headertop").style.transform = "translateX(0)"
79+
} else if(deviation.length) {
80+
deviation[0].style.transform = "translateX(0)";
8181
}
8282
}
8383
setFontSize();

src/common.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363

6464
<script>
6565
var win_width = 375;
66+
var deviation = document.querySelectorAll(".continar,.os-headertop");
6667
var setFontSize = function() {
6768
win_width = window.innerWidth;
6869
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) || win_width < 1200) {
@@ -75,9 +76,8 @@
7576
pro = 100
7677
}
7778
document.documentElement.style.setProperty("font-size", pro + "px");
78-
// document.documentElement.style.setProperty("transition", "font-size 0.15s");
79-
} else {
80-
documen.querySelectorAll(".continar,.os-headertop").style.transform = "translateX(0)"
79+
} else if(deviation.length) {
80+
deviation[0].style.transform = "translateX(0)";
8181
}
8282
}
8383
setFontSize();

0 commit comments

Comments
 (0)