Last active
May 12, 2025 09:45
-
-
Save hubgit/7025107 to your computer and use it in GitHub Desktop.
A5 printed card with HTML + 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
| @page { | |
| size: A5; | |
| margin: 0; | |
| } | |
| html { | |
| background: #eee; | |
| } | |
| body { | |
| /* A5 dimensions */ | |
| height: 210mm; | |
| width: 148.5mm; | |
| background: #fff; | |
| margin: 0; | |
| } | |
| .face { | |
| height: 50%; | |
| width: 100%; | |
| position: relative; | |
| } | |
| .face-back { | |
| background: #f6f6f6; | |
| } | |
| .face-front img { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| bottom: 0; | |
| right: 0; | |
| width: 100%; | |
| height: 100%; | |
| } |
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> | |
| <meta charset="utf-8"> | |
| <link rel="stylesheet" href="card.css"> | |
| <body> | |
| <div class="face face-back"></div> | |
| <div class="face face-front"><img src="front.png"></div> | |
| </body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment