How to change transparent Navbar background when view in mobile


I have a navbar which is set to transparent background when viewing in desktop mode.

But when I viewed in mobile mode, it is transaparent

Is there a way where I can have a tranaparent backgound when viewed in Latpop, tablets and Desktop but not in mobile mode? Thanks

You can try this

.navbar {
  --bs-bg-opacity: 1;
  background-color: rgba(var(--bs-tertiary-bg-rgb),var(--bs-bg-opacity));

@media (min-width: 768px) {
  .navbar {
    background-color: transparent;
1 Like