# cover-view

覆盖在原生组件之上的文本视图。可覆盖的原生组件包括 video
只支持嵌套 cover-viewcover-image,可在 cover-view 中使用 button。组件属性的长度单位默认为 px

# 属性

| |

  1. tip: cover-view 和 cover-image 的 aria-role 仅可设置为 button,读屏模式下才可以点击,并朗读出“按钮”;为空时可以聚焦,但不可点击
  2. tip: 支持 touch 相关事件,也可使用 hover-class 设置点击态
  3. tip: 支持设置 scale rotate 的 css 样式,包括 transition 动画
  4. tip: 最外层 cover-view 支持 position: fixed
  5. tip: 支持 css transition 动画,transition-property 只支持 transform (translateX, translateY)与 opacity。
  6. tip: 支持 css opacity。
  7. tip: 事件模型遵循冒泡模型,但不会冒泡到原生组件。
  8. tip: 文本建议都套上 cover-view 标签,避免排版错误。
  9. tip: 只支持基本的定位、布局、文本样式。不支持设置单边的 border、background-image、shadow、overflow: visible 等。
  10. tip: 建议子节点不要溢出父节点
  11. tip: 支持使用 z-index 控制层级
  12. tip: 默认设置的样式有:white-space: nowrap; line-height: 1.2; display: block;

# 扫码体验

# 示例代码

Copyright ©2024, All Rights Reserved