粘性顶部的Bootstrap节点模块问题

时间:2019-07-04 19:15:49

标签: angular bootstrap-4

我正在Angular 7项目中使用Bootstrap 4.3.1。

angular.json

"styles": [
  "src/styles.scss"
],

"scripts": [
  "node_modules/jquery/dist/jquery.slim.min.js",
  "node_modules/popper.js/dist/umd/popper.min.js",
  "node_modules/bootstrap/dist/js/bootstrap.min.js"
],

style.scss

@import '../node_modules/bootstrap/scss/bootstrap.scss';

一切正常,实际上我已经工作了好几个星期,而且没有任何问题,除了sticky-top https://getbootstrap.com/docs/4.3/utilities/position/#sticky-top之外,我不明白为什么它在我的项目中不起作用。

我对stackblitz进行了测试,如果它https://stackblitz.com/edit/angular-ma79ds有效,那么我的项目出了点问题,但我不知道它能做什么。

<div class="col-4">
  <div class="sticky-top">
    My content...
  </div>  
</div>

欢迎任何帮助。

0 个答案:

没有答案
相关问题