python(html float)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div style="width: 20%;background-color: #458B00">s</div>
    <div style="width: 80%;background-color: #458B00">b</div>
    </br>
    <div style="width: 20%;background-color: #159; float:left">s</div>
    <div style="width: 80%;background-color: #458B00; float:left">b</div>
    </br>
    <div style="width: 20%;background-color: #159; float:left">s</div>
    <div style="width: 30%;background-color: #458B00; float:right">b</div>


</body>
</html>

 

float
让标签浪起来,块级标签也可以堆叠

<div style="clear: both;"></div>

 

发表评论