Created
December 29, 2020 10:33
-
-
Save vanaf1979/1f73caabf97a70ee9629ef80052aa81b to your computer and use it in GitHub Desktop.
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"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Add icon to pdf links</title> | |
<link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.7.1/css/all.css?ver=1.0.0' type='text/css' media='all'/> | |
</head> | |
<body> | |
<a href="document.pdf">Link to a pdf document</a> | |
<style> | |
body { | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
justify-content: center; | |
margin: 0; | |
min-height: 100vh; | |
font-family: sans-serif; | |
} | |
a { | |
color: black; | |
} | |
a[href$=".pdf"]::before { | |
font-family: "Font Awesome 5 Free"; | |
font-weight: 400; | |
content: "\f1c1"; | |
padding-right: 4px; | |
} | |
</style> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment