<html.img>
<html.img> 组件允许您渲染图像。
概述
要显示图像元素,请渲染 <html.img> 组件。
import { html } from 'react-strict-dom';
const Foo = () => (
<html.img
loading="lazy"
onLoad={() => {}}
srcSet="https://srcSet-2x.jpg 2x"
/>
);
属性
- ...通用属性
altcrossOrigindecodingdraggablefetchPriorityheightloadingonErroronLoadreferrerPolicysrcsrcSetwidth