我对 html 有一个问题,我研究了很多,但没有找到太多帮助。我想在行首打印一个名字,在行尾打印另一个名字。插入空格不是一个好的选择,因为页面是按百分比设计的,以适应各种屏幕。怎么做? http://postimg.org/image/utm9nax6j/
问问题
67 次
1 回答
0
在下面试试这个(演示在这里http://jsfiddle.net/eKh6b/2/)
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type='text/css'>
.left {float:left}
.right {float:right}
.clear {clear:both}
</style>
</head>
<body>
<div class="left clear">name1</div>
<div class="right">name2</div>
<div class="left clear">name3</div>
<div class="right">name4</div>
</body>
</html>
于 2013-11-14T02:55:52.750 回答