0
以下是我的應用程序在ReactJS組件內呈現的一行,並保存爲nav.jsx
。如何將樣式應用於Bootstrap React元素?
<span style="font-family: 'Open Sans', sans-serif;"> Home</span>
例外:
Uncaught Error: The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX. This DOM node was rendered by `Nav`.
at invariant (react.js:18354)
at assertValidProps (react.js:6435)
at ReactDOMComponent.mountComponent (react.js:6678)
at Object.mountComponent (react.js:12978)
at ReactDOMComponent.mountChildren (react.js:11692)
at ReactDOMComponent._createContentMarkup (react.js:6815)
at ReactDOMComponent.mountComponent (react.js:6703)
at Object.mountComponent (react.js:12978)
at ReactDOMComponent.mountChildren (react.js:11692)
at ReactDOMComponent._createContentMarkup (react.js:6815)
這究竟是爲什麼以及如何我申請的字體?