绕日
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2025-11-22 19:00:33 +08:00
parent a20432b779
commit 950a298833

View File

@@ -241,12 +241,20 @@ $(function () {
const width = $(window).width();
const num = width / 1400;
if (1000 < width && width < 1440) {
$("section").attr(
"style",
"width:1400px;transform: scaleX(" + num + ");transform-origin: 0 0;"
);
// 为了避免首页 3D 粒子地球被横向压扁,这里不再对首页 banner 区域做 scaleX仅对其他 section 生效
$("section")
.not(".banner")
.each(function () {
this.style.width = "1400px";
this.style.transform = "scaleX(" + num + ")";
this.style.transformOrigin = "0 0";
});
} else {
$("section").attr("style", "");
$("section").each(function () {
this.style.width = "";
this.style.transform = "";
this.style.transformOrigin = "";
});
}
};
resize();