html – 如何将两个span元素左对齐,另一个向右对齐?
发布时间:2020-12-14 16:45:55 所属栏目:资源 来源:网络整理
导读:我有两个 span内容: span style="margin-right:auto;"?2012 XYZ Corp. All Rights Reserved./spanspan 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
我有两个< 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> 我想要第一个< span>位于页面左侧,第二个< span>无论页面宽度如何都在右侧(所以我不能使用固定定位). 我可以使用什么CSS来做到这一点? 解决方法
css变量float用于定位元素.
选项是: 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> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |