direction:rtl demo

<style>
body {font:14px/18px Consolas;}
div {
width:100px;padding:10px;
margin:10px 0px 30px 0px;
border:1px solid #CCC;
}
.float {overflow:hidden;} /*加overflow防止容器坍缩*/
.float span {float:right;}
.align {text-align:right;}
.align span {text-align:left;}
.direction {direction:rtl;}
.direction span {direction:ltr;display:inline-block;}
</style>
float right
<div class="float">
<span>次</span><span>碳</span><span>酸</span><span>钴</span>
</div>
align right
<div class="align">
<span>次</span><span>碳</span><span>酸</span><span>钴</span>
</div>
direction rtl
<div class="direction">
<span>次</span><span>碳</span><span>酸</span><span>钴</span>
</div>

direction:rtl demo

上一篇:递归可太难了,理解都费劲


下一篇:python 二级 标准库