Last active
January 19, 2017 08:52
-
-
Save nahanil/1cd1da584975e25e255af5620f04b0ce to your computer and use it in GitHub Desktop.
Vertical aligned Zhuyin/bopomofo ruby text with HTML & CSS (1st attempt)
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 { | |
font-size: 1.9em; | |
color: #333; | |
} | |
ruby { | |
position: relative; | |
margin-right: 0.3em; | |
} | |
rt { | |
position: absolute; | |
color: #555; | |
display: block; | |
right: -0.4em; | |
width: 0.5em; | |
top: 0.5em; | |
line-height: .9em; | |
text-align: center; | |
font-size: 0.4em; | |
transition: all .2s ease; | |
font-weight: 900; | |
} | |
ruby:hover rt { | |
color: #333; | |
} | |
rt span { | |
display: block; | |
position: absolute; | |
font-size: 1.2em; | |
top: 40%; | |
right: -0.6em; | |
} |
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
<!-- | |
First reasonably successful attempt at getting this to work (and using IE to develop with of all things! Who knew) | |
There should be a working copy of this code at: https://jsfiddle.net/texh/0pxyo7c4/ | |
Doesn't appear to work in Chrome (Android at least) | |
--> | |
<p> | |
<ruby>我<rt>ㄨㄛ<span>ˇ</span></rt></ruby> | |
<ruby>很<rt>ㄏㄣ<span>ˇ</span></rt></ruby> | |
<ruby>無<rt>ㄨ<span>ˊ</span></rt></ruby> | |
<ruby>聊<rt>ㄌㄧㄠ<span>ˊ</span></rt></ruby> | |
</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment