Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can we change the color of arrow in the popover of bootstrap?

Tags:

  <div class="  affix  popover right" id ="one" style="margin-left:8em;margin-top:10em;  width:15em;background-color:rgba(228,19,47,0.9);padding:5px;border-radius:10px;">     <div class="arrow" style="margin-top:-45px;"></div>      <center style="padding:20px;"><b>this is the message</b></center>  </div> 

This code creates the popover with a arrow how can we change the color of this arrow.

enter image description here

like image 439
dpndra Avatar asked Jul 29 '14 09:07

dpndra


People also ask

How do I change the color of my accordion arrow in bootstrap?

You might want to change the content of the :after element of the . accordion-button . Show activity on this post. background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.

How do I change the popover position in bootstrap?

Positioning with Margins So to move the popover more to the left, we can add a negative margin-left, or a positive one to move it further to the right. Likewise, we can move the popover more up by adding a negative margin-top, and down by using a positive value.

How do you make a popover in HTML and CSS?

How To Create a Popover. To create a popover, add the data-toggle="popover" attribute to an element. Note: Popovers must be initialized with jQuery: select the specified element and call the popover() method.


2 Answers

Use this css changing border-right color of pseudo element:

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

#DEMO

like image 127
Manwal Avatar answered Sep 20 '22 20:09

Manwal


In Bootstrap 4,

.bs-popover-top .arrow::after, .bs-popover-auto[x-placement^="top"] .arrow::after {     border-top-color: yellow; // Any color here } 
like image 25
KimchiMan Avatar answered Sep 19 '22 20:09

KimchiMan