Bootstrap transparent navbar

后端 未结 7 1801
星月不相逢
星月不相逢 2021-02-05 15:23

I\'m trying to make the navbar transparent kinda like this. But I can\'t seem to get it to work. I\'ve added rga(0,0,0,0.5) on the navbar class.

相关标签:
7条回答
  • 2021-02-05 16:09

    I'm not sure how recent an addition this is, but in Bootstrap v4.5, you simply need to add the bg-transparent classname to your navbar's class attribute, like so:

    <nav class="navbar navbar-expand-lg navbar-light bg-transparent">
    

    Here's Bootstrap's documentation on color utility classes: https://getbootstrap.com/docs/4.5/utilities/colors/#background-color

    0 讨论(0)
提交回复
热议问题