标签:next content lock block spl table center text col
float 属性的原本作用是:
为了实现文字环绕效果
<div class="float_layout--adaptive_layout">
<div class="flaot_bar">float layout</div>
<div class="adaptive_bar">adaptive bar</div>
</div>
/* float_layout--adaptive */
.flaot_bar {
width: 100px;
float: left;
border: 2px solid red;
}
.adaptive_bar {
padding-left: 100px;
border: 2px dotted green;
}
<div class="multi_column_layout">
<a class="pre" href=""><<previous </a>
<a class="next" href="">next>></a>
<h2 class="title">tile</h2>
</div>
.multi_column_layout {
border: 1px solid black;
}
.pre {
float: left;
}
.next {
float: right;
}
.title {
margin: 0 200px;
text-align: center;
}
元素盒子的边不能和
前面的
浮动元素相邻
::after
等伪元素默认是 内联元素
。清除浮动需要添加 display:table
or display:block
::after {
content:'';
display:table;
clear:both;
}
标签:next content lock block spl table center text col
原文地址:https://www.cnblogs.com/rosendolu/p/10293711.html