From 5b56db02d5ef1cf7ee76628f119ae5808f80069e Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Mon, 4 Sep 2023 00:34:12 +0800 Subject: [PATCH] fix showTimer by using transform --- game/game.js | 2 +- layout/default/layout.css | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/game/game.js b/game/game.js index 0b64d54a5..a2dacbb66 100644 --- a/game/game.js +++ b/game/game.js @@ -23957,7 +23957,7 @@ var bar=ui.create.div(this.node.timer); ui.refresh(bar); bar.style.transitionDuration=(time/1000)+'s'; - bar.style.width=0; + bar.style.transform='scale(0,1)'; }, hideTimer:function(){ if(_status.connectMode&&!game.online&&this.playerid){ diff --git a/layout/default/layout.css b/layout/default/layout.css index 37344fc77..a16aa826e 100644 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -4589,6 +4589,8 @@ div[data-decoration="bronze"]::after{ .timerbar>div:last-child { background: linear-gradient(#FFDA47, #CE0404); transition-timing-function: linear; + float: left; + transform-origin: left; } /*.timerbar>div:last-child{background: linear-gradient(#FFFFFF,#F0F0F0);} .timerbar[data-color="red"]>div:last-child{background: linear-gradient(#FF0000, #CE0404)}