我有两个< span>内容:
<span style="margin-right:auto;">©2012 XYZ Corp. All Rights Reserved.</span> <span style="margin-left:auto;">Built with <a href="http://www.wordpress.org/">wordpress</a> and hosted by <a href="http://www.mediatemple.net/">(mt)</a> in California.</span>@H_301_4@我想要第一个< span>位于页面左侧,第二个< span>无论页面宽度如何都在右侧(所以我不能使用固定定位). @H_301_4@我可以使用什么CSS来做到这一点?
解决方法
css变量float用于定位元素.
@H_301_4@选项是:
float:left; float:right; float:none;
<span style="float:left;">©2012 XYZ Corp. All Rights Reserved.</span> <span style="float:right;">Built with <a href="http://www.wordpress.org/">wordpress</a> and hosted by <a href="http://www.mediatemple.net/">(mt)</a> in California.</span>