Raj*_*kar 5 angular-material npm-install ng-bootstrap angular
如果我使用 ng-bootstrap,grid style
则不起作用,但是当我使用 bootstrap(在 style.css 或 angular.json style[] 数组中提供)网格样式时,它工作正常,但它会覆盖有角度的材料设计。
ng-bootstrap and bootstrap both I installed from npm
我用了 <div class="col-md-6 md-offset-3"></div>
hak*_*vic 10
如果你只需要使用引导电网,您可以在添加package.json
依赖关系:"bootstrap": "4.3.1"
和npm i
则在您styles.scss
添加@import 'bootstrap/dist/css/bootstrap-grid.min.css';
上攻角材料主题导入和你去那里,你仅进口的网格样式没有其他东西和材料的主题仍然是相同的.
这是stackblitz上的一个例子
这是你导入的未缩小文件的来源
即使我们对 Bootstrap 的最小包含也添加了几种样式,这些样式与开箱即用的 Angular Material 不能很好地配合。让\xe2\x80\x99s 创建styles-reset.scss
包含以下内容的新文件,并在主styles.scss
文件中导入原始 Bootstrap 后导入它。
* { &:active, :focus { outline: none !important; }} Label { margin-bottom: 0;} \n
Run Code Online (Sandbox Code Playgroud)\n\nBootstraplink color
还在.underline text-decoration
hovered links
我们可以通过像这样调整文件内容来删除这些样式styles-variables.scss
并将其导入到style.scss
$link-hover-decoration: none;
// 删除按钮链接的下划线
$link-color: #3f51b5;
// 根据使用的材质主题设置链接颜色
$link-hover-color: currentColor;
归档时间: |
|
查看次数: |
6353 次 |
最近记录: |