【发布时间】:2022-03-07 07:44:07
【问题描述】:
如何使用选取框标签。它不支持 ReactJS 中的 html 标签。我试图导入 react-text-marquee 仍然样式不反映
public render(): React.ReactElement<IScrollTickerWebPartProps> {
return (
<div className={styles.panelStyle} >
<br></br>
<Marquee text="swetha">Test</Marquee>
<br></br>
<div className={styles.tableStyle} >
{this.state.items.map(function(item,key){
return (<div className={styles.rowStyle} key={key}>
<div className={styles.CellStyle}>{item.Title}</div>
</div>);
})}
</div>
</div>
);
}
【问题讨论】:
-
<Marquee>html 标签没有内置 JSX 标签。与 JSX 相关的指定 html 标签在 react docs 中定义 -
JSX 支持绝大多数 HTML 标签:react-cn.github.io/react/docs/tags-and-attributes.html
-
哦,如何在jsX中使用它?
-
@tombraider 我无法在 JSX 中使用它。
标签: reactjs