关于flex两端对齐 类似左右浮动

		<div class="hot-header">
			<h3 class="title common-title left">热门楼盘</h3>
			<div class="right">全部<span class="icon">&gt;</span></div>
		</div>
    .hot-header{
    	display: flex;
    	flex-flow: row nowrap;
    	justify-content: space-between;
     }
	 .left {
		height: 30px;
	 }
	 .right {
		height: 30px;
		line-height: 30px;
		font-size: 14px;
		color: #9E9E9E;
	 }
	 .icon {
		margin-left: 8px;
	 }

关键样式

display: flex;

flex-flow: row nowrap;

justify-content: space-between;

猜你喜欢

转载自blog.csdn.net/MeetLunay/article/details/84858347