欢迎来到258分享网,纯净的网络源码分享基地!

258资源分享网

全部作品
全部作品
网站源码
微信源码
素材特效
源码插件
视频教程
建站学院
热门搜索: 织梦  农业种植  农业  安全设置  官方
258资源分享 > 建站学院 > 微信开发 > 小程序UI与容器组件(view,scroll-view,swiper)

推荐下载

HTML5响应式自适应网咯设计

2020-05-12   浏览:740

高端HTML5响应式企业通用网

2020-05-06   浏览:521

html5响应式外贸网站英文版

2020-05-08   浏览:510

HTML5自适应律师工作室类网

2020-04-04   浏览:504

HTML5影视传媒文化公司类网

2020-05-12   浏览:500

小程序UI与容器组件(view,scroll-view,swiper)

发布时间:2020-12-06  

    1.总结与概述

    2.容器组件

            2.1 组件容器(view)

            2.2 可滚动视图容器(scroll-view)

            2.3 滑块视图容器(swiper)

1.总结与概述

小程序UI与容器组件(view,scroll-view,swiper)

1.1 UI组件总结图

 1.2 概述

        小程序的UI组件也就是定义用户界面的一系列标签,类似于html标签。一个完整用户响应过程:事件触发——>UI组件接收到事件——>触发js函数响应事件——>更新UI

 

 2.容器组件

 

2.1 容器组件(view)

    (1)总结

小程序UI与容器组件(view,scroll-view,swiper)

 

    (2)例子

        效果图

小程序UI与容器组件(view,scroll-view,swiper)

        page.wxml

<view>

<text class="row-view-title">水平布局:</text>

<view class="flex-wrp-row">

<view class="flex-item-red" hover="true" hover-class="hover-style"><text class="color-text">red</text></view>

<view class="flex-item-green" hover="true" hover-class="hover-style"><text class="color-text">green</text></view>

<view class="flex-item-blue" hover="true" hover-class="hover-style"><text class="color-text">blue</text></view>

</view>

</view>

<view>

<text class="column-view-title">垂直布局:</text>

<view class="flex-wrp-column" >

<view class="flex-item-red" hover="true" hover-class="hover-style"><text class="color-text" >red</text></view>

<view class="flex-item-green" hover="true" hover-class="hover-style"><text class="color-text">green</text></view>

<view class="flex-item-blue" hover="true" hover-class="hover-style"><text class="color-text">blue</text></view>

</view>

</view>

 

        page.wxss

.flex-item-red{

background-color: red;

height: 200rpx;

width: 200rpx;

text-align: center;

line-height: 200rpx;

}

.flex-item-green{

background-color: green;

height: 200rpx;

width: 200rpx;

text-align: center;

line-height: 200rpx

}

.flex-item-blue{

background-color: blue;

height: