微信小程序

1.文本两端对齐

text{
text-align:justify;
width:200rpx;//设置文本宽度
}
text::after{
    width:100%;
    display:inline-block;
    content:'';
}

2.view布局

display:flex;git

  1. flex-direction 决定是横向仍是纵向微信

    row               从左到右的水平方向为主轴(默认值)
       row-reverse       从右到左的水平方向为主轴
       column            从上到下的垂直方向为主轴
       column-reverse    从下到上的垂直方向为主轴
  2. justify-content 在横向上作改变微信开发

    flex-start       主轴起点对齐(默认值)
       flex-end         主轴结束点对齐
       center           主轴中居中对齐
       space-between    两端对齐
       space-around     元素之间等距离
  3. align-items 在纵向上作改变工具

    stretch          填充整个容器(默认值)
       flex-start       侧轴的起点对齐
       flex-end         侧轴的终点对齐
       center           侧轴居中对齐
       baseline         以子元素的第一行文字对齐

3.text内容空格

<text decode="{{true}}" space="{{true}}">&nbsp;&nbsp;</text>

4.input为数字键盘

定义type属性值
number 数字键盘(无小数点)
idcard 数字键盘(无小数点,有x键)
digit 数字键盘(有小数点)布局


5.自定义微信客服

<button open-type="contact" bindcontact="handleContact" id='contact' style='display:none;'></button> 
<label for='contact' class='btn'>联系卖家</label>

6.微信开发者工具新增iPhone4屏幕

图片描述

相关文章
相关标签/搜索