javascript - Reactjs 创建边框,而纯 html 没有
问题描述
我的问题是,当我在 js React 文件上使用此代码时,我基本上得到了两个侧边栏,无论我做什么,我都无法弄清楚如何删除它们,在 css 中,两侧没有边框/填充.
class App extends React.Component{
render(){
return(
<div className="container-fluid">
<div className="container-fluid home-div">
<img className="profile-pic" src="https://www.ladyblitz.it/wp-content/uploads/2015/09/fbShared-e1442238915211.jpg"/>
<h1 className="title">Title</h1>
<h1 className="title-js">subtitle</h1>
</div>
<div className="container-fluid biography-div">
<h1 className="biography-title">-- title thing --</h1>
<p className="biography-text">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
</div>
);
}
}
ReactDOM.render(<App/>, document.getElementById('root'))
但是如果我把 html 写在 html 文件中,一切正常,我可以使用页面的整个宽度,没有侧边栏,谁能解释我为什么?
解决方案
推荐阅读
- c#-to-vb.net - 在 VB.Net 中传递一个 lambda 表达式代替 iComparator
- python - Python:在数据框中每 3 行加起来
- ubuntu - 从我自己的脚本触发 Ubuntu 会话注销
- django - 将评论表单与 django 中的帖子放在同一页面上
- ios - 如何检查 iPhone 是否连接了 360 度全景相机?
- flutter - 如何用 spaceBetween 填充父级以拥有列表视图
- java - 加载 XLSX 文件时“找不到提供程序 com.bea.xml.stream.EventFactory”
- python - 如何在 Flask 中导入“随机”?
- azure-sql-database - Azure 数据同步的按需触发器 API
- plotly-dash - 在 for 循环中绘制破折号回调