8 css user-interface positioning alignment
有没有一种优雅的方法可以在同一条线上左右,中间和右边对齐3个元素?
现在我<div>用宽度为3 的全部:33%;浮动:左; 而且效果不好.
这对我行得通:
<html>
<head>
<style>
div.fl {
float: left;
width: 33%;
}
div.fr {
float: right;
width: 33%;
}
</style>
</head>
<body>
<div class="fl">
A
</div>
<div class="fl">
B
</div>
<div class="fr">
C
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
你的意思是一样的吗?
| 归档时间: |
|
| 查看次数: |
32327 次 |
| 最近记录: |