Last active
August 21, 2019 16:50
-
-
Save spring-raining/cf05110c8b2f5949490ad6b135d6836a to your computer and use it in GitHub Desktop.
Negative margin reproduction
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="ja"> | |
| <head> | |
| <meta charset="UTF-8"/> | |
| <meta name="viewport" content="width=s, initial-scale=1.0"/> | |
| <title>Negative margin reproduction</title> | |
| <style> | |
| .box { | |
| margin-top: -1000px; | |
| padding-top: 1000px; | |
| width: 100px; | |
| height: 100px; | |
| background-color: yellow; | |
| border: 3px solid orange; | |
| } | |
| .footnote { | |
| float: footnote; | |
| } | |
| @page { | |
| size: 100mm 100mm; | |
| @top-center { | |
| content: ''; | |
| background-color: rgba(0, 255, 0, 0.3); | |
| margin-left: -1mm; | |
| margin-right: -1mm; | |
| padding-left: 1mm; | |
| padding-right: 1mm; | |
| } | |
| @top-right-corner { | |
| content: ''; | |
| background-color: rgba(0, 255, 0, 0.3); | |
| margin-top: -3mm; | |
| margin-right: -3mm; | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="box">box</div> | |
| <span class="footnote">footnote</span> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment