# cover-view

Start from base library version 1.4.0. Please remaining backward compatible.

The text view that overrides the native component.

at presentNative component is already supported for same layer rendering, and it is recommended to use view Substitute. Native components that can be overridden include mapvideocanvascameralive-playerlive-pusher

Nesting only cover-viewcover-image, available in the cover-view Used in button。 The unit of length of the component attribute defaults to px, Support incoming units from 2.4.0(rpx/px)。

attribute type Default value Required Introductions Minimum version
scroll-top number/string no Set the top scroll offset, only when the overflow-y: scroll Becomes a scrolling element. 2.1.0

# Bug & Tip

  1. tip: [cover-view]((cover-view) and[cover-image]((cover-image)aria-roleCan only be set tobuttonClick on the on in the screen reading mode, and read out the "on"Can focus when empty, but cannot click
  2. tip: Base library 2.2.4 Rise support touch Related events, or you can use the hover-class Set Click Mode
  3. tip: Base library 2.1.0 Start Support Settings scale rotate of css Styles, including transition animation
  4. tip: Base library 1.9.90 rise cover-view Support overflow: scrollBut does not support dynamic updates overflow
  5. tip: Base library 1.9.90 Outermost layer cover-view Support position: fixed
  6. tip: Base library 1.9.0 Up support plug in view Wait for the label. Prior to this, only native components can be nestedmapvideocanvascameraAvoid nesting within other components.
  7. tip: Base library 1.6.0 Start supporting css Transition animation,transition-propertyOnly supporttransform (translateX, translateY)andopacity
  8. tip: Base library 1.6.0 Start supporting css opacity。
  9. tip: The event model follows the bubbling model but does not bubble to native components.
  10. tip: All text suggestions are tagged with cover-view tags to avoid typographical errors.
  11. tip: Only basic positioning, layout, and text styles are supported. Do not support settingsUnilateral borderbackground-imageshadowoverflow: visibleWait.
  12. tip: Advise child nodes not to overflow parent nodes
  13. tip: Support use z-index Control level
  14. tip: The default styles are:white-space: nowrap line-height: 1.2 display: block
  15. bug: Custom component nesting cover-view To customize the component s slot And its parent node temporarily supports passing wx:if Control explicit or cause cover-view Do not show

# sample code

Preview with Developer Tool