【发布时间】:2020-08-05 00:29:32
【问题描述】:
我在我的 Angular 应用程序中使用引导程序。我在我的 Index.html 中有它,如下所示:
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css">
我的 Package.json 中也有这个
"private": true,
"dependencies": {
"@angular/animations": "^9.1.2",
"@angular/cdk": "^9.2.1",
"@angular/common": "~9.1.2",
"@angular/compiler": "~9.1.2",
"@angular/core": "~9.1.2",
"@angular/forms": "~9.1.2",
"@angular/material": "^9.2.1",
"@angular/platform-browser": "~9.1.2",
"@angular/platform-browser-dynamic": "~9.1.2",
"@angular/router": "~9.1.2",
"bootstrap": "^4.4.1",
"rxjs": "~6.5.5",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
不过,当我在我的应用程序中使用下面的代码时,每一列都会进入不同的行而不是同一行。
<div class="container">
<div class="row">
<div class="col-sm">
One of three columns
</div>
<div class="col-sm">
One of three columns
</div>
<div class="col-sm">
One of three columns
</div>
</div>
</div>
下面是我在应用程序中获得的屏幕截图:
任何帮助将不胜感激。
【问题讨论】:
-
你需要多少行
标签: angular typescript bootstrap-4