信息排列效果-筆記

 示例:

https://wxygoing.github.io/learn/%E4%BF%A1%E6%81%AF%E6%8E%92%E5%88%97%E6%95%88%E6%9E%9C/informationSortStyle-all.html

.bottom {
			height: 40px;
			line-height: 40px;
			text-align: center;
			background-color: #ccc;
			#margin-top: 100px;
			#clear: both;
			#float: left;   /*父元素float,子元素text-align: center;無效,解決將子元素設爲浮動或者清除浮動*/
			#width: 100%;
		}

清除浮動示例:

 http://wxygoing.github.io/learn/%E4%BF%A1%E6%81%AF%E6%8E%92%E5%88%97%E6%95%88%E6%9E%9C/clearFloat.html

.box:after {
		    content: "";
		    height: 0;
		    display: block;
		    visibility: hidden;
		    clear: both;
		}

		.box {
		    zoom: 1;  //after僞類,觸發IE下haslayout,使元素根據自身內容計算寬高,它的效果和height:1%一樣。
		}

清除浮動參考文章: 

 https://www.cnblogs.com/fanyj/p/4431737.html

 https://blog.csdn.net/promisecao/article/details/52771856

https://blog.csdn.net/aiyawei123/article/details/80810527

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章