找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索本站精品资源

首页 教程频道 小程序开发 查看内容

微信小程序学习实践记录《五》:button控件

作者:模板之家 2018-1-30 11:35 2603人关注

button控件学习 1.button属性 2.size和type属性对button的影响 size属性的默认值为default,type属性的默认值也为default,如果值为default时,该属性可以省略; view plain copyview class=content !--t

button控件学习

1.button属性

2.size和type属性对button的影响

size属性的默认值为default,type属性的默认值也为default,如果值为default时,该属性可以省略;

 

[html] view plain copy

<view class="content">  
<!--type属性为default-->  
<!--size属性为default-->  
<button type="default" size="default"> size属性为default </button>  
<!--size属性为mini-->  
<button type="default" size="mini"> size属性为mini </button>  
  
<!--type属性为primary-->  
<!--size属性为default-->  
<button type="primary" size="default"> size属性为default </button>  
<!--size属性为mini-->  
<button type="primary" size="mini"> size属性为mini </button>  
  
<!--type属性为warn 一般用于需要慎重点击的按钮-->  
<!--size属性为default-->  
<button type="warn" size="default"> size属性为default </button>  
<!--size属性为mini-->  
<button type="warn" size="mini"> size属性为mini </button>  
</view>  

 

3.plain属性对按钮的影响

 

[html] view plain copy

<!--type属性为default-->  
<!--plain属性为false的时候可以省略-->  
<button type="default" size="default"> size属性为default </button>  
<!--plain属性为true-->  
<button type="default" size="default" plain="true"> size属性为mini </button>  
  
  
  
  
<!--type属性为primary-->  
<!--plain属性为false的时候可以省略-->  
<button type="primary" size="default" > size属性为default </button>  
<!--plain属性为true-->  
<button type="primary" size="default" plain="true"> size属性为mini </button>  
  
  
  
  
<!--type属性为warn 一般用于需要慎重点击的按钮-->  
<!--plain属性为false的时候可以省略-->  
<button type="warn" size="default"> size属性为default </button>  
<!--plain属性为true-->  
<button赞赏


路过

雷人

握手

鲜花

鸡蛋
原作者: 模板之家 来自: 网络收集

全部回复(0)