This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user