Last active
January 15, 2019 02:09
-
-
Save motsu0/dff00985cda484812abcbad718be109a to your computer and use it in GitHub Desktop.
write fraction with only 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
.fraction{ | |
display: inline-block; | |
vertical-align: middle; | |
text-align: center; | |
} | |
.fraction_n,.fraction_d{ | |
display: block; | |
} | |
.fraction_n{ | |
border-bottom: 1px solid #333; | |
} |
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
<p> | |
2 ÷ 3 = | |
<span class="fraction"> | |
<span class="fraction_n">2</span> | |
<span class="fraction_d">3</span> | |
</span> | |
<br> | |
11 ÷ 37 = | |
<span class="fraction"> | |
<span class="fraction_n">11</span> | |
<span class="fraction_d">37</span> | |
</span> | |
<br> | |
-1 ÷ 23456 = | |
-<span class="fraction"> | |
<span class="fraction_n">1</span> | |
<span class="fraction_d">23456</span> | |
</span> | |
</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment