Created
December 31, 2017 11:02
-
-
Save koreapyj/ff7ac9cab4d9d2e7abb80a3f3306c77e 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
<html> | |
<head> | |
<style> | |
div { | |
display: inline-block; | |
border: 1px solid black; | |
height: 40px; | |
vertical-align: top; | |
text-decoration: underline; | |
} | |
div:nth-of-type(1) { | |
line-height: 40px; | |
} | |
div:nth-of-type(2):before { | |
content: ''; | |
display: inline-block; | |
vertical-align: middle; | |
height: 100%; | |
} | |
</style> | |
</head> | |
<body> | |
<div>line-height: 100%</div> | |
<div>before vertical-align</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://codepen.io/SaschaNaz/pen/NXjEvG