在angular2中修改工具提示的BootStrap4 Css

时间:2016-11-22 05:31:04

标签: html css angular sass ng-bootstrap

我在我的项目中创建了ngbtooltip,基本上我试图在显示填充,颜色和对齐时覆盖bootstrap 4 css。

我正在尝试使用单独的css文件,以便我不需要修改主引导程序css。

我的html文件是

<div class = 'test123' *ngIf = "config.description" >
<i [ngClass]="_tooltipClass" [placement]="_placement"  [ngbTooltip]="config.description"></i>
</div>

我创建的css文件没有任何影响,相反我的工具提示依赖于主css,而不是听我为工具提示创建的CSS。

例如,bootstrap的主css文件使用“text-align:center”,我想要实现的是如下所述,“text-align:right”。但是当我运行我的浏览器时它显示文本为中心而非反应

.test123 .tooltip-inner  {
 max-width: $tooltip-max-width;
 padding: $tooltip-padding-y $tooltip-padding-x;
 color: $tooltip-color;
 text-align: right;**
 background-color: $tooltip-bg;
 @include border-radius($border-radius);

 &::before {
 position: absolute;
 width: 0; 
 height: 0;
 border-color: transparent;
 border-style: solid;
  }
}

0 个答案:

没有答案
相关问题