欧美一区二区三区,国内熟女精品熟女A片视频小说,日本av网,小鲜肉男男GAY做受XXX网站

增加導航條品牌的大小

傅智翔2年前8瀏覽0評論

我正在建立一個登陸頁面,但我的標志看起來很小,我用的是bootstrap 5

style.css

...
.navbar-brand {
  width: 3.5rem;
  padding: 0 0;
  margin: 0.3rem 0;
  position: relative;
}

.navbar-brand img {
  width: 100%;
  height: auto;
}

body .navbar-brand .logo-dark {
  display: none;
}

body.dark-layout .navbar-brand .logo-light {
  display: none;
}

body.dark-layout .navbar-brand .logo-dark {
  display: block;
}

@media (min-width: 576px) {
  .navbar-expand-sm .navbar-brand {
    width: 4.5rem;
  }

  .navbar-expand-sm.headroom--not-top:not(.headroom--pinned):not(.headroom--bottom) {
    transform: translateY(-100%);
  }

  .navbar-expand-sm .nav-item {
    height: 4.5rem;
    display: flex;
    align-items: center;
  }

  .navbar-expand-sm .nav-item:not(:first-child) {
    margin-left: 1.25rem;
  }
}

@media (min-width: 768px) {
  .navbar-expand-md .navbar-brand {
    width: 4.5rem;
  }

  .navbar-expand-md.headroom--not-top:not(.headroom--pinned):not(.headroom--bottom) {
    transform: translateY(-100%);
  }

  .navbar-expand-md .nav-item {
    height: 4.5rem;
    display: flex;
    align-items: center;
  }

  .navbar-expand-md .nav-item:not(:first-child) {
    margin-left: 1.25rem;
  }
}

@media (min-width: 992px) {
  .navbar-expand-lg .navbar-brand {
    width: 4.5rem;
  }

  .navbar-expand-lg.headroom--not-top:not(.headroom--pinned):not(.headroom--bottom) {
    transform: translateY(-100%);
  }

  .navbar-expand-lg .nav-item {
    height: 4.5rem;
    display: flex;
    align-items: center;
  }

  .navbar-expand-lg .nav-item:not(:first-child) {
    margin-left: 1.25rem;
  }
}

@media (min-width: 1200px) {
  .navbar-expand-xl .navbar-brand {
    width: 4.5rem;
  }

  .navbar-expand-xl.headroom--not-top:not(.headroom--pinned):not(.headroom--bottom) {
    transform: translateY(-100%);
  }

  .navbar-expand-xl .nav-item {
    height: 4.5rem;
    display: flex;
    align-items: center;
  }

  .navbar-expand-xl .nav-item:not(:first-child) {
    margin-left: 1.25rem;
  }
}

@media (min-width: 1400px) {
  .navbar-expand-xxl .navbar-brand {
    width: 4.5rem;
  }

  .navbar-expand-xxl.headroom--not-top:not(.headroom--pinned):not(.headroom--bottom) {
    transform: translateY(-100%);
  }

  .navbar-expand-xxl .nav-item {
    height: 4.5rem;
    display: flex;
    align-items: center;
  }

  .navbar-expand-xxl .nav-item:not(:first-child) {
    margin-left: 1.25rem;
  }
}

.navbar-expand .navbar-brand {
  width: 4.5rem;
}
...

這是我的html文件

[![...
<body>
  <nav class="navbar navbar-expand-lg navbar-transparent navbar-sticky navbar-light">
    <div class="container-fluid px-xl-0 mx-xl-5">
      <a class="navbar-brand" href="index.html">
        <img src="{{ url_for('static', filename='images/logo-no-background.svg') }}" alt="" class="">

      </a>
...][1]][1]

您的navbar品牌大小沒有變化,因為它的顯示是內嵌的& lta & gt標簽默認顯示:inline。

將display:block添加到navbar-brand,您的寬度將生效:

.navbar-brand {
    width: 3.5rem;
    padding: 0 0;
    margin: 0.3rem 0;
    position: relative;
    display: block;
}