Last active
June 1, 2022 01:57
-
-
Save xiongchengqing/3268f14ba3900b650f7e8ef3c6b70320 to your computer and use it in GitHub Desktop.
diagonal-fill-css
This file contains hidden or 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
{ | |
"scripts": [], | |
"styles": [] | |
} |
This file contains hidden or 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"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>diagonal fill</title> | |
<link rel="stylesheet" href="./style.css"> | |
</head> | |
<body> | |
<div class="diagonal-fill" style="height:200px;"></div> | |
</body> | |
</html> |
This file contains hidden or 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
.diagonal-fill { | |
background-image: linear-gradient( | |
-45deg, | |
rgba(204, 204, 204, 0.2) 12.5%, | |
#0000 12.5%, #0000 50%, | |
rgba(204, 204, 204, 0.2) 50%, rgba(204, 204, 204, 0.2) 62.5%, | |
#0000 62.5%, #0000 100% | |
); | |
background-size: 8px 8px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment