没改轮播图的版本
This commit is contained in:
+30
-1
@@ -23,7 +23,10 @@
|
||||
"Helvetica Neue", Arial, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
min-width: 320px;
|
||||
min-width: 1280px;
|
||||
}
|
||||
body {
|
||||
transform-origin: top left;
|
||||
}
|
||||
a {
|
||||
color: inherit;
|
||||
@@ -1133,6 +1136,32 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 视口缩放 - 基于1920px设计稿
|
||||
const designWidth = 1920;
|
||||
const minWidth = 1280;
|
||||
const maxWidth = 2560;
|
||||
|
||||
function scale() {
|
||||
const vw = window.innerWidth;
|
||||
let scale = 1;
|
||||
|
||||
if (vw < minWidth) {
|
||||
scale = vw / minWidth;
|
||||
} else if (vw > maxWidth) {
|
||||
scale = vw / maxWidth;
|
||||
} else {
|
||||
scale = vw / designWidth;
|
||||
}
|
||||
|
||||
document.body.style.transform = `scale(${scale})`;
|
||||
document.body.style.width = `${designWidth}px`;
|
||||
}
|
||||
|
||||
scale();
|
||||
window.addEventListener('resize', scale);
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
// 社交媒体弹窗控制
|
||||
const socialModal = document.getElementById('socialModal');
|
||||
|
||||
Reference in New Issue
Block a user