Last active
June 21, 2022 06:44
-
-
Save biologyscience/0e76baee716d16337b4b6c0c9fcb7939 to your computer and use it in GitHub Desktop.
Simple pop up on a button in html with css
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
body | |
{ | |
background-color: rgb(32, 28, 43); | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} | |
button#popUpButton | |
{ | |
background: none; | |
border: 5px solid rgb(189, 26, 243); | |
border-radius: 20px; | |
text-align: center; | |
color: white; | |
font-size: 80px; | |
transition: ease-in-out; | |
transition-duration: 200ms; | |
padding-left: 4%; | |
padding-right: 4%; | |
padding-top: 2%; | |
padding-bottom: 2%; | |
} | |
button#popUpButton:hover | |
{ | |
pointer: cursor; | |
transform: translateY(-7px); | |
transition: ease-in-out; | |
transition-duration: 200ms; | |
} |
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
<html> | |
<head> | |
<link rel="stylesheet" href="popUp.css"> | |
</head> | |
<body> | |
<button id="popUpButton"> Hover me ! </button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment