Change arrow color of bootstrap popover

0

I want to know how I can change the color of the arrows of the bootstrap popover. I have the bootstrap css linked.

Should I modify the local css or the bootstrap css?

    
asked by Fernando catalán 22.04.2018 в 22:32
source

2 answers

0

It is better to make a modification to your local css, which is above the reference to bootstrap.

.popover-header{
  /// tus cambios en la cabecera del popover
 }

.popover-body{
  /// tus cambios en el cuerpo del popover
 }

 popover > .arrow{
  /// tus en la flecha del popover
 }
    
answered by 23.04.2018 в 13:19
0

Use this CSS by changing the color of the right edge of the element Pseudo :

.popover.right .arrow:after {
  border-right-color: red;
}

Look at a Demo to see how it works.

Another small example:

Using a popover standard in Bootstrap 3:

<button type="button" class="btn btn-default" data-toggle="popover" data-placement="right" data-content="Este es el mensaje">
  Popover on right
</button>

You can add the following css to your custom rules:

.popover {
  background-color: red; /*sustituye 'rojo' con tu color de elección*/
  border-color: red;
}
.popover.right>.arrow:after {
  border-right-color: red;
}
.popover-content {
  background-color: red;
}
    
answered by 23.04.2018 в 15:58