做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

微信小程序實現YDUI的ScrollNav組件

來源:懂視網 責編:小OO 時間:2020-11-27 22:20:14
文檔

微信小程序實現YDUI的ScrollNav組件

本文實例為大家分享了微信小程序實現滾動導航效果的具體代碼,供大家參考,具體內容如下:DEMO下載;效果圖;實現原理;采用雙 scroll-view 組件實現雙滾動。WXML;
推薦度:
導讀本文實例為大家分享了微信小程序實現滾動導航效果的具體代碼,供大家參考,具體內容如下:DEMO下載;效果圖;實現原理;采用雙 scroll-view 組件實現雙滾動。WXML;

本文實例為大家分享了微信小程序實現滾動導航效果的具體代碼,供大家參考,具體內容如下

DEMO下載

效果圖

YDUI的ScrollNav效果圖

實現原理

采用雙 scroll-view 組件實現雙滾動!

WXML

<!--導航滾動 -->
<scroll-view class="tui-city-scroll" scroll-x="true" scroll-into-view="NAV{{status}}" scroll-with-animation="true">
 <text bindtap="getStatus" id="NAV{{index}}" class="tui-nav-li {{index === status ? 'tui-nav-active' : ''}}" data-index="{{index}}" wx:for="{{navList}}">{{item}}</text>
</scroll-view>
<!--列表滾動區 -->
<view class="tui-fixed-y">
 <scroll-view class="tui-city-scroll-y" scroll-y="true" scroll-into-view="NAV{{status}}" scroll-with-animation="true">
 <view wx:for="{{navList}}">
 <view id="NAV{{index}}" class="tui-list-head">{{item}}</view>
 <view class="tui-list-li">{{item}} 列表 {{index}}</view>
 </view>
 </scroll-view>
</view>

WXSS

.tui-fixed-x{
 width: 100%;
 position: fixed;
 top: 0;
 left: 0;
}
.tui-city-scroll{
 height: 80rpx;
 line-height: 80rpx;
 width: 100%;
 white-space: nowrap;
}
.tui-nav-li{
 font-size: 30rpx;
 padding: 0 8rpx;
}
.tui-nav-li:first-child{padding-left: 16rpx;}
.tui-nav-li:last-child{padding-right: 16rpx;}
.tui-nav-active{color: red;}

.tui-fixed-y{
 width: 100%;
 height: calc(100% - 80rpx);
 position: fixed;
 bottom: 0;
 left: 0;
}
.tui-city-scroll-y{
 padding: 0 20rpx;
 height: 100%;
 box-sizing: border-box;
}
.tui-list-head{
 height: 50px;
 line-height: 50px;
 text-align: center;
 font-size: 30rpx;
 color: blue;
}
.tui-list-li{
 height: 400px;
 padding: 10rpx;
 color: #fff;
 font-size: 50rpx;
 background-color: lightgreen;
}

JS

Page({
 data: {
 navList: ['今日特惠', '煙灶推薦', '凈水飲水推薦', '洗碗機推薦', '電熱推薦', '燃熱推薦', '消毒柜推薦', '嵌入式推薦', '商用電器','活動說明'],
 status: 0
 },
 getStatus(e){
 this.setData({ status: e.currentTarget.dataset.index})
 }
})

注意

  • scroll-view 組件如果橫向滾動必須要有一個可視寬度,縱向滾動必須要有一個可視高度;
  • 滾動的定位采用 scroll-view 組件的 scroll-into-view 屬性,用 id 進行定位。
  • DEMO下載

    聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

    文檔

    微信小程序實現YDUI的ScrollNav組件

    本文實例為大家分享了微信小程序實現滾動導航效果的具體代碼,供大家參考,具體內容如下:DEMO下載;效果圖;實現原理;采用雙 scroll-view 組件實現雙滾動。WXML;
    推薦度:
    • 熱門焦點

    最新推薦

    猜你喜歡

    熱門推薦

    專題
    Top
    主站蜘蛛池模板: 南涧| 久治县| 房山区| 安庆市| 芒康县| 徐水县| 辽阳县| 开江县| 湖北省| 潜江市| 阿克陶县| 高台县| 大化| 泾川县| 湘潭县| 德兴市| 扬州市| 南丰县| 扎赉特旗| 广河县| 桂阳县| 静宁县| 潜江市| 泗洪县| 南皮县| 易门县| 灵川县| 伊春市| 久治县| 清流县| 津南区| 安顺市| 南安市| 揭西县| 永吉县| 康定县| 昆山市| 哈巴河县| 临漳县| 内乡县| 康乐县|