【发布时间】:2018-10-11 02:11:48
【问题描述】:
.backgroundImage {
background: url("page_livraison1.png") , url("Route.png");
height: 100vh;
background-position: bottom;
background-repeat: no-repeat;
}
.verticalNav {
background-color: #000000BF;
height:100vh;
}
<div class="verticalNav col-md-3"> </div>
<div class="backgroundImage col-md-9"> </div>
这是我在 bootstrap 中的代码,但是当我想在 react js 和 reactStrap 中做同样的事情时,我没有得到相同的结果...... 这是我的反应代码
import Background from '../img/page_livraison1.png';
import Background1 from '../img/route.png';
const bgImgStyle = {
background: `url(${Background})`+','+`url(${Background1})`,
backgroundRepeat: 'no-repeat',
height:'100vh',
backgroundPosition: 'bottom',
}
const sideBarStyle = {
backgroundColor:'#000000BF',
height:'100vh',
}
export default {sideBarStyle};
export default {bgImgStyle};
<Row>
<Col lg="3" md="3" sm="5" xs="6">
<SideBar />
</Col>
<Col lg="9" md="9" sm="7" xs="6">
<BgImg />
</Col>
</Row>
我不明白为什么结果不一样但是我做了完全相同的代码...
- https://i.stack.imgur.com/pG00P.png 这是在 reactstrap 中
和
- https://i.stack.imgur.com/DHVL2.png 这是在引导程序中
【问题讨论】:
-
你的引导 HTML 是什么?
-
什么意思?你会说法语吗?
-
你很幸运,因为它是一个英文网站,我会翻译成英文。 Aurais-tu le HTML de ton fichier bootstrap ?
-
d'accord j'avais bien compris mais je ne vois pas de quel fichier tu parles ? mon html est envoyer c'est 2 div avec 2 Colonne une de 9 et l'autre de 3 c'est tout le bootstrap vient du cdn tandis qu'en react je l'ai installer en Cli npm commande sa répond a ta question ?
-
翻译:好的,我理解得很好,我只是不明白你说的是哪个文件。我的 HTML 是 2 div 和 2 col(1 of 9 和 1 of 3)。 Bootstrap 来自 CDN,react 是从 npm 安装的。这能回答你的问题吗?
标签: twitter-bootstrap reactjs reactstrap