Toggle navigation
Toggle navigation
This project
Loading...
Sign in
조수연
/
Find_your_own_personal_color
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
이수빈
2020-12-11 12:37:37 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
85130f8a5d10b93549c1a65bbb9072771635ab32
85130f8a
1 parent
75a1840c
last
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
52 deletions
front/src/Home.js
front/src/snow.css
front/src/Home.js
View file @
85130f8
import
React
from
'react'
;
import
'./Home.css?v=1.0'
;
import
'./snow.css'
;
const
Snowflake
=
({
style
})
=>
{
return
(
<
p
className
=
"snow-flake"
style
=
{
style
}
>
{
"\u2745"
}
<
/p
>
);
};
const
makeSnowFlakes
=
()
=>
{
let
animationDelay
=
"0.1s"
;
let
fontSize
=
"14px"
;
const
arr
=
Array
.
from
(
"Merry Christmas"
);
return
arr
.
map
((
el
,
i
)
=>
{
animationDelay
=
`
${(
Math
.
random
()
*
80
).
toFixed
(
100
)}
s`
;
fontSize
=
`
${
Math
.
floor
(
Math
.
random
()
*
10
)
+
25
}
px`
;
const
style
=
{
animationDelay
,
fontSize
,
};
return
<
Snowflake
key
=
{
i
}
style
=
{
style
}
/>; }
)
;
};
const
Home
=
(
{
history
}
)
=>
{
...
...
@@ -36,9 +7,6 @@ const Home = ( { history } ) =>
return
(
<>
<
div
>
<
div
className
=
"snow-container"
>
{
makeSnowFlakes
()}
<
/div
>
<
head
>
<
link
rel
=
"stylesheet"
href
=
"https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css"
><
/link
>
<
/head
>
...
...
front/src/snow.css
deleted
100644 → 0
View file @
75a1840
.snow-container
{
display
:
flex
;
justify-content
:
space-between
;
}
.snow-flake
{
color
:
rgb
(
255
,
255
,
255
);
animation
:
fall
2.5s
linear
infinite
;
}
@keyframes
fall
{
0
%
{
opacity
:
1
;
color
:
#ff7777
;
}
15
%
{
opacity
:
0.9
;
color
:
#ffa166
;
}
30
%
{
opacity
:
0.9
;
color
:
#ffd96f
}
45
%
{
opacity
:
0.9
;
color
:
#8cff7d
;
}
60
%
{
opacity
:
0.9
;
color
:
#7cb7ff
;
}
75
%
{
opacity
:
0.9
;
color
:
#7d7dff
;
}
90
%
{
opacity
:
0.9
;
color
:
#a781ff
;
}
100
%
{
transform
:
translate
(
0
,
200px
);
opacity
:
0.3
;
color
:
#f280ff
;
}
}
\ No newline at end of file
Please
register
or
login
to post a comment