diff --git a/packages/nuxt/src/app/components/nuxt-loading-indicator.ts b/packages/nuxt/src/app/components/nuxt-loading-indicator.ts index 0de19aed37..fb112b451e 100644 --- a/packages/nuxt/src/app/components/nuxt-loading-indicator.ts +++ b/packages/nuxt/src/app/components/nuxt-loading-indicator.ts @@ -42,12 +42,14 @@ export default defineComponent({ right: 0, left: 0, pointerEvents: 'none', - width: `${indicator.progress.value}%`, + width: 'auto', height: `${props.height}px`, opacity: indicator.isLoading.value ? 1 : 0, background: props.color || undefined, backgroundSize: `${(100 / indicator.progress.value) * 100}% auto`, - transition: 'width 0.1s, height 0.4s, opacity 0.4s', + transform: `scaleX(${indicator.progress.value}%)`, + transformOrigin: 'left', + transition: 'transform 0.1s, height 0.4s, opacity 0.4s', zIndex: 999999 } }, slots)