flex布局左右两边固定,中间自适应

2020-05-06 18:42:48

flex布局左右两边固定,中间自适应

	<style>
        #flex{
            display: flex;
            background-color: skyblue;
            height: 100px;
            line-height: 100px;
        }

        #left,.right{
            width: 200px;
        }
        #center{
            background:pink;
            /*flex:1*/
            /*等价于*/
            flex-grow: 1;
            text-align: center;
        }
    </style>
    
	<div id="flex">
        <div id="left">我在左边,width: 200px;</div>
        <div id="center">我在右边,自适应</div>
        <div class="right">我在右边,width:200px</div>
    </div>


  • 2018-01-01 10:50:49

    仿QQ长按弹出功能菜单

    android app普遍常用的弹出上下文菜单是列表式的。QQ列表,在上方弹出冒泡效果菜单,如图