Skip to content

Instantly share code, notes, and snippets.

@biologyscience
Last active June 21, 2022 06:44
Show Gist options
  • Save biologyscience/0e76baee716d16337b4b6c0c9fcb7939 to your computer and use it in GitHub Desktop.
Save biologyscience/0e76baee716d16337b4b6c0c9fcb7939 to your computer and use it in GitHub Desktop.
Simple pop up on a button in html with css
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;
}
<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