【问题标题】:Bold text in react component?反应组件中的粗体文本?
【发布时间】:2021-08-02 22:16:15
【问题描述】:

我不明白如何在这里将粗体文本设为“第一”?

React.createElement('li', null, `first: port`),

【问题讨论】:

  • <b>first: </b> port?
  • 你不使用JSX有什么原因吗?

标签: html css reactjs jsx


【解决方案1】:

你可以这样做:

React.createElement(
  "li",
  null,
  React.createElement("b", null, "first:"),
  " port", 
);

【讨论】:

    猜你喜欢
    • 2014-09-04
    • 1970-01-01
    • 1970-01-01
    • 2022-01-09
    • 1970-01-01
    • 1970-01-01
    • 2013-01-31
    • 2011-03-09
    • 1970-01-01
    相关资源
    最近更新 更多