<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          【組件庫】首頁功能模塊界面(2)

          共 14322字,需瀏覽 29分鐘

           ·

          2021-09-12 13:28

          效果展示

          靜態(tài)展示

          靜態(tài)展示效果

          動態(tài)展示

          動態(tài)展示效果

          Demo代碼

          js

          Page({

            /**
             * 頁面的初始數(shù)據(jù)
             */

            data: {
              //功能模塊 
              // functions: [{
              //     name: '時光荏苒',
              //     numbers: '',
              //     iconpath: '/images/code.png',
              //     classifier: "Share",
              //     color: "orange",
              //     path: "../code/code"
              //   },
              //   {
              //     name: '每日一題',
              //     numbers: "",
              //     color: "cyan",
              //     iconpath: '/images/topic.png',
              //     classifier: "Dayup",
              //     path: "../resources/resources",
              //   },
              //   {
              //     name: '小小學(xué)堂',
              //     numbers: '',
              //     color: "red",
              //     iconpath: '/images/choucang.png',
              //     classifier: "Study",
              //     path: "../works/works",
              //   },
              //   {
              //     name: '創(chuàng)意小屋',
              //     numbers: '',
              //     color: "purple",
              //     iconpath: '/images/shangcheng.png',
              //     classifier: "Happy",
              //     path: "../functions/functions",
              //   }
              // ],
            },

            /**
             * 生命周期函數(shù)--監(jiān)聽頁面加載
             */

            onLoadfunction (options{

            },

            /**
             * 生命周期函數(shù)--監(jiān)聽頁面初次渲染完成
             */

            onReadyfunction ({

            },

            /**
             * 生命周期函數(shù)--監(jiān)聽頁面顯示
             */

            onShowfunction ({

            },

            /**
             * 生命周期函數(shù)--監(jiān)聽頁面隱藏
             */

            onHidefunction ({

            },

            /**
             * 生命周期函數(shù)--監(jiān)聽頁面卸載
             */

            onUnloadfunction ({

            },

            /**
             * 頁面相關(guān)事件處理函數(shù)--監(jiān)聽用戶下拉動作
             */

            onPullDownRefreshfunction ({

            },

            /**
             * 頁面上拉觸底事件的處理函數(shù)
             */

            onReachBottomfunction ({

            },

            /**
             * 用戶點(diǎn)擊右上角分享
             */

            onShareAppMessagefunction ({

            }
          })

          wxml

          <view class="box">
            <view class="item_1">
              <!-- <view class="box_right">
             <view class="box_righttop">時光荏苒</view>
             <view class="box_rightlow"><text style="font-size:50rpx;margin:3rpx;color:red;">{{item.numbers}}</text>Study</view>
            </view>
            <view class="box_left">
             <image class="box_img" src="/images/choucang.png"></image>
            </view> -->

            </view>
            <view class="item_2 bg-cyan light">
              <!-- <view class="box_right">
             <view class="box_righttop">時光荏苒</view>
             <view class="box_rightlow"><text style="font-size:50rpx;margin:3rpx;color:red;">{{item.numbers}}</text>Study</view>
            </view>
            <view class="box_left">
             <image class="box_img" src="/images/choucang.png"></image>
            </view> -->

            </view>
            <view class="item_3 bg-red light">
              <!-- <view class="box_right">
             <view class="box_righttop">時光荏苒</view>
             <view class="box_rightlow"><text style="font-size:50rpx;margin:3rpx;color:red;">{{item.numbers}}</text>Study</view>
            </view>
            <view class="box_left">
             <image class="box_img" src="/images/choucang.png"></image>
            </view> -->

            </view>
            <view class="item_4 bg-purple light">
              <!-- <view class="box_right">
             <view class="box_righttop">時光荏苒</view>
             <view class="box_rightlow"><text style="font-size:50rpx;margin:3rpx;color:red;">{{item.numbers}}</text>Study</view>
            </view>
            <view class="box_left">
             <image class="box_img" src="/images/choucang.png"></image>
            </view> -->

            </view>
            <view class="circlex">
              <view class="loading">
                <view class="wave"></view>
              </view>
            </view>
          </view>

          wxss

          .box {
            position: relative;
            width90%;
            height420rpx;
            margin50% auto;/*整個模塊的位置 可以自己修改*/
            /* background: #000; */
          }

          .item_1 {
            position: absolute;
            top0px;
            left0px;
            width48%;
            height200rpx;
            border-radius16rpx;
            background-color#fde6d2;
            overflow: hidden;
            display: flex;
            flex-wrap: wrap;
          }

          .item_1 .fun_name {
            position: relative;
            width100%;
            height40%;
            /* background-color: red; */
            padding-top10%;
            padding-left20%;
            line-height100%;
            align-items: center;
            font-size30rpx;
          }

          .item_1 .fun_icon {
            width100%;
            height60%;
          }

          .box_img {
            width120rpx;
            height120rpx;
          }

          .item_2 {
            position: absolute;
            top0px;
            right0px;
            width48%;
            height200rpx;
            border-radius16rpx;
            background-color#cce6ff;
            overflow: hidden;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
          }

          .item_3 {
            position: absolute;
            bottom0;
            left0px;
            width48%;
            height200rpx;
            background-color#fadbd9;
            border-radius16rpx;
            overflow: hidden;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
          }

          .item_4 {
            position: absolute;
            /* top: 220rpx; */
            bottom0;
            right0px;
            width48%;
            height200rpx;
            background-color#e1d7f0;
            border-radius16rpx;
            overflow: hidden;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
          }

          .circlex {
            position: absolute;
            top50%;
            left50%;
            transformtranslate(-50%, -50%);
            width200rpx;
            height200rpx;
            border-radius50%;
            background-color#fff;
            overflow: hidden;
          }

          .circlex .loading {
            position: absolute;
            top50%;
            left50%;
            transformtranslate(-50%, -50%);
            width170rpx;
            height170rpx;
            /* background-color:red; */
            border-radius50%;
            background#b0f4ff;
            border-radius50%;
            overflow: hidden;
            animation: loadingBreath 12s infinite linear;
          }

          .circlex .loading::before {
            content'Haihong';
            position: absolute;
            top50%;
            left50%;
            transformtranslate(-50%, -50%);
            font-size12px;
            letter-spacing2px;
            color#10a789;
            font-family: sans-serif;
            z-index2;
          }

          .circlex .loading::after {
            content'';
            position: absolute;
            width100%;
            height25%;
            bottom0;
            background-imagelinear-gradient(to top, #12c8e0, #36e9ff, #5ffbf1);
            animation: loadingRun 5.2s linear infinite;
          }

          .wave::before {
            content'';
            position: absolute;
            left: -50%;
            width200%;
            height200%;
            z-index1;
            background-color#85f7fb;
            border-radius52% 25% 62% 69%/25% 38%;
            animation: loadingWave 5.2s linear infinite;
          }

          .wave::after {
            content'';
            position: absolute;
            left: -50%;
            width200%;
            height200%;
            z-index1;
            background-color#d0f4ff;
            border-radius42% 38% 40% 62%/28% 35%;
            animation: loadingWave 5.2s ease-in-out infinite;
          }


          .middle {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: space-between;
            width90%;
            margin0 auto;
            transformtranslate3d(000);
            opacity1;
          }

          .middle_box {
            width48%;
            margin-top10rpx;
            margin-bottom10rpx;
            height200rpx;
            background: yellowgreen;
            border-radius16rpx;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
          }

          .box_right {
            width50%;
            display: flex;
            flex-direction: column;
            align-items: center;

            vertical-align: center;
            justify-content: center;
          }

          .box_righttop {
            padding-top40rpx;
            padding-left30rpx;
            width100%;
            height100rpx;
            font-size30rpx;
          }

          .box_rightlow {
            width110%;
            height100rpx;
            padding-top00rpx;
            padding-left40rpx;
          }

          .box_left {
            width50%;
          }

          .box_img {
            margin-top50rpx;
            margin-left20rpx;
            width120rpx;
            height120rpx;
          }

          .circle {
            position: absolute;
            top42%;
            left50%;
            transformtranslate(-50%0);
            width200px;
            height200px;
            background#b0f4ff;
            border-radius50%;
            overflow: hidden;
            animation: loadingBreath 2s infinite linear;
          }

          /* 呼吸燈動畫 */

          @keyframes loadingBreath {
            0% {
              box-shadow0 0 5px 0 #85f7fb;
            }

            25% {
              box-shadow0 0 20px 0 #85f7fb;
            }

            50% {
              box-shadow0 0 5px 0 #85f7fb;
            }

            75% {
              box-shadow0 0 20px 0 #85f7fb;
            }

            100% {
              box-shadow0 0 5px 0 #85f7fb;
            }
          }

          /* 底部液體上升動畫 */

          @keyframes loadingRun {
            0% {
              height25%;
            }

            100% {
              height100%;
            }
          }

          /* wave動畫 */

          @keyframes loadingWave {
            0% {
              top: -100%;
              transformrotate(0);
            }

            100% {
              top: -200%;
              transformrotate(360deg);
            }
          }

          結(jié)語

          這種樣式的模塊是挺早以前就有點(diǎn)感覺

          前一段時間沒事寫了寫

          感覺還是有點(diǎn)不太行

          主要是title、icon位置不知道咋放才顯得美觀一點(diǎn)(注釋代碼可以去掉 看看效果圖 自己感覺不好看就注釋了)

          「文章僅作為學(xué)習(xí)筆記,記錄從0到1的一個過程」

          希望對您有所幫助,如有錯誤歡迎小伙伴指正~

          瀏覽 62
          點(diǎn)贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          分享
          舉報
          評論
          圖片
          表情
          推薦
          點(diǎn)贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  丁香五月激情啪啪啪 | 翔田千里无码播放HD | 日韩欧美人妻无码精品 | 夜夜高潮夜夜爽精品欧美做爱 | 精品久久ai电影 九九精品在线观看 |