Change arrow colors in Bootstraps carousel

后端 未结 13 2081
[愿得一人]
[愿得一人] 2020-12-12 19:25

I\'m obviously missing something stupidly simple here. I have images with a white background so I want to be able to edit the arrows on the Bootstraps Carousel so they are v

13条回答
  •  青春惊慌失措
    2020-12-12 20:23

    This worked for me:

    .carousel-control-prev-icon {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e");
          }
          
          .carousel-control-next-icon {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e");
          }
    

    I changed the color in the url of the icon. Thats the original that is used in the bootstrap page but with this section in black:

    "...fill='%23000'..."

提交回复
热议问题