html - 在新的 react 元素中呈现错误

标签 html css reactjs

我正在尝试在一个新的 React 元素中渲染它,但没有渲染,你们有什么想法吗?

链接(https://codepen.io/anon/pen/rJdxZJ?editors=1101)

代码:

class App extends Component {
 render() {
  return (
  <div>
    <div className="content" id='one' alt=''/>
    <div className="content" id='two' alt=''/>
    <div className="content" id='three' alt=''/>
    <div className="content" id='four' alt=''/>
    <div className="content" id='five' alt=''/>
  </div>
);
}}

export default App;

CSS

与链接相同

最佳答案

很有可能,您的 CSS 未包含在 HTML 中。要么你必须导入你的 CSS 以便 Webpack 启动。或者您应该在 index.html 中包含最终的 CSS。

关于html - 在新的 react 元素中呈现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48878566/

相关文章:

html - 封面图片未出现在移动网站上但工作正常

c# - 单击时如何使内容切换向下/向上滑动

html - 如何更改负号位置CSS

css - 如何为 iPad Chrome 浏览器预加载图像?

javascript - 上传图片后如何移动按钮?

reactjs - 在 IIS 10 上创建 React 应用程序

javascript - 将对象作为链接中的参数传递

javascript - 如何从状态数组创建下拉列表?

javascript - textarea 属性值更改时触发过程

html - 复选框和下拉箭头在 chrome 中不可见