How can I change link color and hover color in Bootstrap version 4?

前端 未结 9 1280
南笙
南笙 2021-01-11 14:33

In my design, I want to change my link and hover color in a specific part. I try my best but I can\'t do that. I am new in bootstrap. How can I change it for Bootstr

9条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-11 15:05

    Two ways (which is actually one):

    1. Adding your own styles

    Actually bootstrap allows being overwritten in almost every case, therefore if you set something in your own .css it will overrule the style set in bootstrap.css

    So adding this to your own .css:

    .navbar ul li a {
    color:#fff;}
    .navbar ul li a:hover {
    color:#000;}
    

    You will see it works as a charm.

    2. You can go and find everything set in bootstrap.css

    I highly discourage you doing so unless it is really necessary, since every styling can be overwritten and it will create a cleaner structure for your styling.

提交回复
热议问题