微信小程序开发和H5的开发主要区别在于标签和js部分

1、标签,微信小程序的开发很多的H5标签都是不支持的,类似H5的h1~h6,span,a,div,ul,li等等,微信小程序有它标签也叫组件。下面进行详细的解析:(注意每个属性支持的版本库

A:view标签:基础标签,类似H5中的div,块级标签;

B: scroll-view:相当于H5中的div标签添加了overflow-x/overflow-y属性;多用于头部滑动导航,支持属性如下:

微信小程序开发基础-标签篇(视图容器)

C:swiper:滑动视图容器,多用于滑动广告图,支持属性如下:

微信小程序开发基础-标签篇(视图容器)

微信小程序开发基础-标签篇(视图容器)

示例代码如下:

<swiper class='swiper' indicator-dots='true' indicator-color='#fff' indicator-active-color='#25f6d5' autoplay='true' circular='true' interval='3000' duration='1000' bindchange='change'>
<swiper-item class='item' >
<image src='../../image/1.jpg' class='img'></image>
</swiper-item>

<swiper-item class='item' >
<image src='../../image/2.jpg' class='img'></image>
</swiper-item>

<swiper-item class='item' >
<image src='../../image/3.jpg' class='img'></image>
</swiper-item>
</swiper>





这一章到此结束,后续会有补充,欢迎扫码支持,谢谢!

微信小程序开发基础-标签篇(视图容器)

相关文章:

  • 2021-12-29
  • 2022-01-08
  • 2021-07-12
  • 2021-05-05
  • 2021-10-18
  • 2022-01-02
  • 2021-10-02
猜你喜欢
  • 2021-12-02
  • 2022-03-03
  • 2021-07-27
  • 2022-12-23
  • 2021-09-09
  • 2021-12-30
相关资源
相似解决方案