Last active
September 10, 2023 07:04
-
-
Save Gayo/d66181a59507d4a842bf83eb890ca07e to your computer and use it in GitHub Desktop.
A simple demo of color hints in linear and radial gradients.
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 lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Gradient test</title> | |
<style> | |
.box { | |
width: 400px; | |
height: 300px; | |
border: 2px solid black; | |
margin: 10px; | |
text-align: center; | |
vertical-align: middle; | |
line-height: 300px; | |
} | |
.linear-gradient { | |
background: linear-gradient(yellow, 75%, red); | |
} | |
.radial-gradient { | |
background: radial-gradient(yellow, 75%, red); | |
} | |
</style> | |
</head> | |
<body> | |
<div class="box linear-gradient">Linear with 75% color hint</div> | |
<div class="box radial-gradient">Radial with 75% color hint</div> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment