微信小程序(2)

基础简单介绍

app.json文件里

    "navigationBarTextStyle": "black",     导航栏字体颜色
    "navigationBarTitleText": "邀请函",    导航栏文本信息
    "navigationBarBackgroundColor": "#ffffff"     导航栏背景颜色
    
   视口单位vw宽度,vh高度
   1vhw=375px/100

   
   小程序里的页面显示,一个小程序里最多只能有五个页面

    "tabBar": {
       "color": "#999",   字体颜色
      "position": "bottom",  侧边栏固定在下面
      "selectedColor": "#00ffff",   文字选中时的颜色
      "backgroundColor": "#862536",  侧边栏背景颜色
    "list": [{
      "pagePath": "pagePath",   跳转路径,在配置文件里含有的
      "text": "text",   文字
      "iconPath": "iconPath",
      "selectedIconPath": "selectedIconPath"
    },{
      "pagePath": "pagePath",   跳转路径
      "text": "text",
      "iconPath": "iconPath",
      "selectedIconPath": "selectedIconPath"
    }]
  },

index.wxml

<view class="indexBoss">
<!-- mode设置裁剪或缩放
show-menu-by-longpress="false"设置长按显示菜单(转发,分享...) -->
  <image class="indexImg" 
  show-menu-by-longpress="false"
   src="../../images/avatar.png" />
</view>
<view>
  <!-- hover-class设置点击态
  hover-stop-propagation阻止本节点出现父级的点击态
  hover-start-time点击后多久触发点击态
  hover-stay-time松开后保留多久点击态 -->
  <view class="indexText" hover-class="box1"
  hover-start-time="1000"
  hover-stay-time="1000">
    姓名:小丽
  </view>
</view>
<view style="height: 500px;background: pink;">

</view>

轮播图

indicator-dots开启小圆点
indicator-color设置小圆点颜色
indicator-active-color设置选中小圆点颜色
autoplay自动轮播
current默认展示第几张
interval切换轮播时间
circular自动衔接

user-select长按选中文本,会让当前元素变为行内块
decode解析字符码


<swiper 
indicator-dots="true" 
indicator-color="#333" 
indicator-active-color="red" 
autoplay="true" 
current="0" 
interval="1000" 
circular="true">
  <swiper-item style="background-color:aqua">1</swiper-item>
  <swiper-item style="background-color:pink">2</swiper-item>
</swiper>

<!-- -->
<text user-select="true" decode="true">12345&lt;</text>
<text>111111111&gt;</text>

</view>
  • 7
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值