Created
March 8, 2022 04:48
-
-
Save ImBIOS/82f92711e7d978b87dd3499fde991fe5 to your computer and use it in GitHub Desktop.
Several technique to set a background color of an element
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<style> | |
body { | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
height: 100vh; | |
margin: 0; | |
background-color: #d3d3d3; | |
} | |
div { | |
height: 30vh; | |
width: 50vw; | |
/* background: white; */ | |
/* background: #a3fcff; */ | |
/* background: rgb(120, 223, 163); */ | |
/* background: rgb(120, 223, 163, 0.5); */ | |
background: hsl(91, 56%, 71%); | |
} | |
</style> | |
</head> | |
<body> | |
<div></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment