diff options
author | crupest <crupest@outlook.com> | 2021-02-15 01:47:30 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-02-15 01:47:30 +0800 |
commit | b2f0154a8a032215f229ffaa39add42fd0688c44 (patch) | |
tree | aac61e25afc8d04d964f5598eaba911456d5ad3f | |
parent | 27880a87edb9d97c97f720d0816c976bb9a3fdc8 (diff) | |
download | timeline-b2f0154a8a032215f229ffaa39add42fd0688c44.tar.gz timeline-b2f0154a8a032215f229ffaa39add42fd0688c44.tar.bz2 timeline-b2f0154a8a032215f229ffaa39add42fd0688c44.zip |
fix: Fix a bug caused by chromium does not support css translate.
-rw-r--r-- | FrontEnd/src/app/views/home/TimelineBoard.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/FrontEnd/src/app/views/home/TimelineBoard.tsx b/FrontEnd/src/app/views/home/TimelineBoard.tsx index 552ec7dd..d1a77bda 100644 --- a/FrontEnd/src/app/views/home/TimelineBoard.tsx +++ b/FrontEnd/src/app/views/home/TimelineBoard.tsx @@ -77,13 +77,13 @@ const TimelineBoardItem: React.FC<TimelineBoardItemProps> = ({ ); const offsetStyle: React.CSSProperties = { - translate: + transform: arbitraryOffset != null - ? `0 ${arbitraryOffset}px` + ? `translate(0,${arbitraryOffset}px)` : offset != null - ? `0 ${offset * 100}%` + ? `translate(0,${offset * 100}%)` : undefined, - transition: offset != null ? "translate 0.5s" : undefined, + transition: offset != null ? "transform 0.5s" : undefined, zIndex: arbitraryOffset != null ? 1 : undefined, }; |