小程序学习之旅----基础内容组件icon 、text 、rich-text、progress


Page({
  data: {
    motto: 'Hello World',
    nodes: [{
      name: 'h2',
      attrs: {
        class: 'h2_class',
        style: 'line-height: 60px; color: red;'
      },
      children: [{
        type: 'text',
        text: 'Hello World!111'
      }]
    }]

    ,
    article:'<h2>我是一个内容</h2> <div>我是一个<strong>div</strong><img src="http://image08.71.net/image08/27/95/11/20/3f8e890b-2243-4054-a433-21c9621b3cb8.jpg" /></div>'
  }
})


  <icon type="warn" size="80" color="red"/>

<view>

相当于div
</view>


<text>
相当于sapn标签
</text>


<view></view>


<text selectable="true">
  相当于sapn标签
</text>



<view></view>



<text decode='true'>
  相当于&nbsp;sapn标签
</text>


<view></view>



<text decode='true'>
  相当于&nbsp;&nbsp;&nbsp;sapn标签
</text>

<view></view>


<text decode='true' space='true'>
  相当于&nbsp;&nbsp;&nbsp;sapn标签
</text>


<view>建议使用全角空格 或者css实现空格</view>
<text>
  相当于     sapn标签
</text>





----------------------------------------



<view>rich-text:Array </view>


<rich-text nodes="{{nodes}}" bindtap="tap"></rich-text>



<view>rich-text:string </view>


<rich-text nodes="{{article}}" bindtap="tap"></rich-text>


<view>WxParser </view>

<view> </view>

<view> </view>





----------------------------------------

<progress percent="20" show-info />
<progress percent="40" stroke-width="12" />
<progress percent="60" color="pink" />
<progress percent="80" active />


<view> 111</view>

<view> 11</view>

#myVideo{
  width: 100%;
  
}
.controls{

  height: 80rpx;
  line-height: 80rpx;
  position: absolute;
  bottom: 0px;

  background: rgba(0, 0, 0, 1);

  width: 100%;

  color: #fff;

  text-align: center;

  display:flex;

}

.play,.pause,.time {
  flex: 1;
  height: 100%;
}
.time {
  text-align: center;
  background-color: rgba(0, 0, 0, .5);
  color: white;
  height: 80rpx;
  line-height: 80rpx;
}
.img {
  width: 24px;
  height: 24px;
  margin: 5px auto;
}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

瑞朋哥

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值