-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from chienhsiang-hung/floating-btn
Floating btn
- Loading branch information
Showing
8 changed files
with
188 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
#floating-button{ | ||
width: 55px; | ||
height: 55px; | ||
border-radius: 50%; | ||
background: white; | ||
position: fixed; | ||
bottom: 30px; | ||
right: 30px; | ||
cursor: pointer; | ||
box-shadow: 0px 2px 10px rgba(0,0,0,0.2); | ||
text-align: center; | ||
} | ||
|
||
#floating-button img { | ||
width: 35px; | ||
height: 35px; | ||
} | ||
|
||
.plus{ | ||
color: black; | ||
position: absolute; | ||
top: 10px; | ||
display: block; | ||
bottom: 0; | ||
left: 10px; | ||
right: 0; | ||
text-align: center; | ||
padding: 0; | ||
margin: 0; | ||
line-height: 55px; | ||
font-size: 38px; | ||
font-family: 'Roboto'; | ||
font-weight: 300; | ||
animation: plus-out 0.3s; | ||
transition: all 0.3s; | ||
} | ||
|
||
#container-floating{ | ||
position: fixed; | ||
width: 70px; | ||
height: 70px; | ||
bottom: 30px; | ||
right: 30px; | ||
z-index: 50px; | ||
} | ||
|
||
#container-floating:hover{ | ||
height: 400px; | ||
width: 90px; | ||
padding: 30px; | ||
} | ||
|
||
#container-floating:hover .plus{ | ||
animation: plus-in 0.15s linear; | ||
animation-fill-mode: forwards; | ||
} | ||
|
||
.edit{ | ||
position: absolute; | ||
top: 0; | ||
display: block; | ||
bottom: 0; | ||
left: 0; | ||
display: block; | ||
right: 0; | ||
padding: 0; | ||
opacity: 0; | ||
margin: auto; | ||
line-height: 65px; | ||
transform: rotate(-70deg); | ||
transition: all 0.3s; | ||
animation: edit-out 0.3s; | ||
} | ||
|
||
#container-floating:hover .edit{ | ||
animation: edit-in 0.2s; | ||
animation-delay: 0.1s; | ||
animation-fill-mode: forwards; | ||
} | ||
|
||
@keyframes edit-in{ | ||
from {opacity: 0; transform: rotate(-70deg);} | ||
to {opacity: 1; transform: rotate(0deg);} | ||
} | ||
|
||
@keyframes edit-out{ | ||
from {opacity: 1; transform: rotate(0deg);} | ||
to {opacity: 0; transform: rotate(-70deg);} | ||
} | ||
|
||
@keyframes plus-in{ | ||
from {opacity: 1; transform: rotate(0deg);} | ||
to {opacity: 0; transform: rotate(180deg);} | ||
} | ||
|
||
@keyframes plus-out{ | ||
from {opacity: 0; transform: rotate(180deg);} | ||
to {opacity: 1; transform: rotate(0deg);} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
d08b53e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nricm-101-map – ./
nricm-101-map-chienhsiang-hung.vercel.app
nricm-101-map-git-main-chienhsiang-hung.vercel.app
nricm101-map.chienhsiang-hung.eu.org
nricm-101-map.vercel.app