Last active
March 30, 2017 16:52
-
-
Save zmts/297c9a166c9176a744654b3348e4fbcc to your computer and use it in GitHub Desktop.
Dotted font effect (via CSS)
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
<!-- demo http://codepen.io/rqnix/pen/mWQEQM --> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<link href="https://fonts.googleapis.com/css?family=Anton" rel="stylesheet"> | |
<title>Document</title> | |
</head> | |
<body> | |
<div>2017</div> | |
</body> | |
</html> |
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
div{ | |
font-family: 'Anton', sans-serif; | |
display: inline-block; | |
padding: 20px; | |
border: 1px solid #ddd; | |
font-size: 100px; | |
background: #ddd; | |
position: relative; | |
&::before{ | |
display: block; | |
content: ''; | |
height: 100%; | |
width: 100%; | |
position: absolute; | |
top: 0; | |
left: 0; | |
z-index: 1; | |
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAMAAABFaP0WAAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAAA5JREFUCNdjYGRgYGQEAAAOAATa5WfvAAAAAElFTkSuQmCC); | |
background-size: 2px 2px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment