<image>

0.4 cn

Summary

image tag is used to render a specified picture, and it shouldn't contain any child component. You can use img as alias.

Notes: the styles of width and height should be specified, otherwise it won't work.

alias: <img>

Child Components

This component supports no child components.

Attributes

  • src: <string> image source url
  • resize: 0.5 <string> the 'ScaleType' of the component. The default value is stretch, if this attribute is not specified. Possible values are cover, contain, each of which has the same meaning with w3c standard.

Other attributes please check out the common attributes.

Styles

  • width: <length> the width of the component. This style should be specified.
  • height: <length> the height of the component. This style should be specifed.

common styles: check out the common styles

  • support flexbox related styles
  • support box model related styles
  • support position related styles
  • support opacity, background-color etc.

Events

common events: check out the common events

Examples

<div>
  <image src="..." ></image>
  <text>...</text>
</div>

results matching ""

    No results matching ""