Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commite6ed039

Browse files
committed
refactor(animation): add will-change to make transform fast
1 parentf690d8b commite6ed039

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

‎src/containers/layout/GlobalLayout/styles/index.ts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ export const Wrapper = styled.div`
1111
1212
&:before {
1313
content: '';
14-
position: absolute;
14+
position: fixed;
15+
width: 100%;
16+
height: 100%;
1517
left: 0;
1618
top: 0;
1719
background-image: url(${ASSETS_ENDPOINT}/space-background.svg);
18-
background-attachment: fixed;
19-
width: 100%;
20-
height: 100%;
20+
/*background-attachment: fixed; */
21+
/* see https://www.zhangxinxu.com/wordpress/2015/11/css3-will-change-improve-paint/ */
22+
will-change: transform;
2123
opacity: 0.6;
2224
}
2325
`

‎src/containers/tool/Drawer/styles/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export const DrawerWrapper = styled.div.attrs(
5454
color:${theme('drawer.font')};
5555
box-sizing: border-box;
5656
transition: transform 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
57+
will-change: transform;
5758
font-family: Roboto, sans-serif;
5859
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
5960
border-radius: 0px;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp