浏览代码

transition

Ref:
https://stackoverflow.com/questions/19808764/transition-for-background-image-in-firefox?noredirect=1&lq=1
Manav Rathi 1 年之前
父节点
当前提交
57dae1d333
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      web/apps/cast/src/components/Slide.tsx

+ 3 - 0
web/apps/cast/src/components/Slide.tsx

@@ -23,6 +23,9 @@ export const SlideView: React.FC<SlideViewProps> = ({ url, nextURL }) => {
                 backgroundRepeat: "no-repeat",
                 backgroundBlendMode: "multiply",
                 backgroundColor: "rgba(0, 0, 0, 0.5)",
+                // Smooth out the transition a bit.
+                // Does not work in Firefox.
+                transition: "background 2s",
             }}
         >
             <div