Skip to content

Commit 7a299f7

Browse files
committed
added halftone CSS background pattern
1 parent dc48f51 commit 7a299f7

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

11. Generative Art/styles.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ body:before {
1212
mix-blend-mode: lighten;
1313
}
1414

15-
body {
15+
body {
1616
background: #00DFFC;
1717
margin: 0;
1818
min-height: 100vh;
1919
}
2020

21-
html {
21+
html {
2222
background: #fff;
2323
}

12. Halftone/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en" dir="ltr">
3+
<head>
4+
<meta charset="utf-8">
5+
<title></title>
6+
<link rel="stylesheet" href="styles.css">
7+
</head>
8+
<body>
9+
<div></div>
10+
</body>
11+
</html>

12. Halftone/styles.css

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
div {
2+
position: relative;
3+
height: 100vh;
4+
background: #fff;
5+
filter: contrast(7);
6+
--mask: linear-gradient(red, rgba(0, 0, 0, 0.45));
7+
}
8+
9+
div::before {
10+
position: absolute;
11+
top: 0;
12+
right: 0;
13+
bottom: 0;
14+
left: 0;
15+
background: radial-gradient(#000, transparent) 0 0/1em 1em space;
16+
-webkit-mask: var(--mask);
17+
mask: var(--mask);
18+
content: "";
19+
}

0 commit comments

Comments
 (0)