02 AppCan入門學習之彈性盒子模型

來源:互聯網
上載者:User

標籤:彈性盒子

彈性盒子模型

效果:

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/71/63/wKiom1XNYGLh4UhrAAFHOr-shzc308.jpg" title="捕獲.PNG" alt="wKiom1XNYGLh4UhrAAFHOr-shzc308.jpg" />

一、彈性盒子模型

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檔案)中添加的設定

 

 

 


02 AppCan入門學習之彈性盒子模型

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.