Created
February 23, 2015 10:07
-
-
Save notcome/c6b11a1110f4ee5fbe1c 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
<style> | |
html { | |
font-family: Helvetica; | |
} | |
body { | |
width: 30em; | |
margin: auto; | |
} | |
p { | |
width: 581px; | |
text-align: justify; | |
} | |
.left + .right, .left + .left { | |
margin-left: -0.5em; | |
} | |
span:lang(cmn) + span:lang(en)::before { | |
content: " "; | |
display: inline-block; | |
max-width: 0.1em; | |
} | |
span:lang(en) + span:lang(cmn)::before { | |
content: " "; | |
display: inline-block; | |
max-width: 0.1em; | |
} | |
</style> | |
<p>我说<span class="left">:</span><span class="right">「</span>你好!快速填充本行!请保持通信静默,除了信息和电子邮件<span class="left">!</span><span class="left">」</span><span lang="cmn">真的笑,笑出声哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈</span><span lang="en">Hello</span><span lang="cmn">真的笑,笑出声</span><span lang="en">Hello</span><span lang="cmn">真的笑,笑出声</span></p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment