彈性盒子模型
效果:
一、彈性盒子模型
1. 流式佈局
<!-- 流式佈局-->
<divstyle='display: inline;border: 1px solid orange'>
<divstyle='display: inline;background: #66ccff'>流式文件左邊</div>
<divstyle='display: inline;background: #ffffff'>流式文件右邊</div>
</div>
2. 彈性盒子 -webkit-box-flex
<!--彈性盒子1--> -webkit-box-flex
<divstyle="display: -webkit-box;width: 200px;border:1px solid orange">
<divstyle="-webkit-box-flex:1;background:#66ccff">彈性合子左邊11111</div>
<divstyle="-webkit-box-flex:1;background: #66ccff">彈性合子右邊1</div>
</div>
<!--彈性盒子2-->
<divstyle='display:-webkit-box;width:200px;border:1px solid blue'>
<divstyle='-webkit-box-flex:1;background:#E00'>aaaa </div>
<divstyle='-webkit-box-flex:2;background:#0EE'>bbbb </div>
<divstyle='background:#0E0'>cccc </div>
</div>
<!--彈性盒子3--> position:absolute
<divstyle='display:-webkit-box;width:200px;border:1px solid blue'>
<divstyle='-webkit-box-flex:1;background:#E00;position:relative'>
<div style='position:absolute;width:100%;height:100%;'>aaaa</div>
</div>
<divstyle='-webkit-box-flex:2;background:#0EE;position:relative'>
<div style='position:absolute;width:100%;height:100%;'>bbbb</div>
</div>
<divstyle='background:#0E0'>cccc </div>
</div>
<!--彈性盒子4--> -webkit-box-direction:reverse;
<divstyle='display:-webkit-box;width:200px;border:1px solidblue;-webkit-box-direction:reverse;'>
<divstyle='-webkit-box-flex:1;background:#E00;position:relative'>
<div style='position:absolute;width:100%;height:100%;'>aaaa</div>
</div>
<divstyle='-webkit-box-flex:2;background:#0EE;position:relative'>
<div style='position:absolute;width:100%;height:100%;'>bbbb</div>
</div>
<divstyle='background:#0E0'>cccc </div>
</div>
<!--彈性盒子5--> -webkit-box-orient:vertical
<divstyle='display:-webkit-box;height:200px;border:1px solid blue;-webkit-box-orient:vertical;'>
<divstyle='-webkit-box-flex:1;background:#E00;position:relative'>
<div style='position:absolute;width:100%;height:100%;'>aaaa</div>
</div>
<divstyle='-webkit-box-flex:2;background:#0EE;position:relative'>
<div style='position:absolute;width:100%;height:100%;'>bbbb</div>
</div>
<divstyle='background:#0E0'>cccc </div>
</div>
<!--彈性BOX架構可以同時兼容流式佈局-->
<divstyle='display:-webkit-box;border:1px solid blue;-webkit-box-orient:vertical;'>
<div>aaaa </div>
<div>bbbb </div>
<div>cccc </div>
</div>
二、字體大小、邊框等設置
<!--添加按鈕btn 圓角uc-a-->
<div class="btn ub bu-ac bc-text-headbu-pc bc-btn uc-a" id="btn">按鈕1</div>
<!--添加按鈕並更改邊框sc-border,使用自己添加色-->
<div class="btn ub bu-ac bc-text-headbu-pc bc-btn uc-a uba sc-borderMy" id="btn">按鈕2</div>
<!--添加按鈕並更改字體ulev,並添加邊距umar-->
<div class="btn ub bu-ac bc-text-headbu-pc bc-btn uc-a ulev-2 umar-a" id="btn">按鈕3</div>
<!--添加按鈕並添加陰影uts,並添加自己定義邊距umar-->
<div class="btn ub bu-ac bc-text-headbu-pc bc-btn uc-a ulev1 uts umar-aMy " id="btn">按鈕4</div>
附:帶有My表示是自己在程序(ui-base.css文件)中添加的設置