title: View

sidebar_label: View

视图容器

属性及支持度

微信小程序 H5 ReactNative 属性名 类型 默认值 说明
x (支持 hoverStyle 属性,但框架未支持 hoverClass) hoverClass String none 指定按下去的样式类。当 hover-class=’none’ 时,没有点击态效果
hoverStartTime Number 50 按住后多久出现点击态,单位毫秒
hoverStayTime Number 400 手指松开后点击态保留时间,单位毫秒
x hoverStopPropagation Boolean false 指定是否阻止本节点的祖先节点出现点击态
示例:
  1. <Text>flex-direction: row 横向布局</Text>
  2. <View className='flex-wrp' style='flex-direction:row;'>
  3. <View className='flex-item demo-text-1'/>
  4. <View className='flex-item demo-text-2'/>
  5. <View className='flex-item demo-text-3'/>
  6. </View>
  7. <Text>flex-direction: column 纵向布局</Text>
  8. <View className='flex-wrp' style='flex-direction:column;'>
  9. <View className='flex-item flex-item-V demo-text-1'/>
  10. <View className='flex-item flex-item-V demo-text-2'/>
  11. <View className='flex-item flex-item-V demo-text-3'/>
  12. </View>