gpt4 book ai didi

html - 如何调整品牌形象?

转载 作者:可可西里 更新时间:2023-11-01 13:34:29 25 4
gpt4 key购买 nike

我对 CSS 和 Bootstrap 还很陌生。

我有大品牌形象 (logotipo-white),我想将其调整为原始尺寸的 30%。但是,当我应用以下代码时,图像看起来很小但仍占据原始空间,将导航链接推到另一行。

我该如何解决这个问题?

HTML:

<body>
<div class = "navbar navbar-fixed-top">
<div class = "navbar-inner">
<div class = "container">
<ul class = "brand"><img src="images/logotipo-white.png"></ul>
<ul class = "nav">
<li class = "active">
<a href = "#">Home</a>
</li>
<li><a href = "#">About</a></li>
<li><a href = "#">Portfolio</a></li>
<li><a href = "#">Contact</a></li>
</ul>
</div>
</div>
</div>
</body>

CSS:

body{
background-image:url('../images/bg-green.jpg') ;
}
.brand img{
max-width: 30%;
}

最佳答案

在 html 中不要为您的品牌使用 ul,因为这不是必需的,请改用 a-tag:

<a class="brand" href="#"><img src="images/logotipo-white.png" /></a>

要解决您的问题,请在 css 中执行以下操作:CSS:

.navbar .brand { 
max-height: 40px;
max-width: 30%;
overflow: visible;
padding-top: 0;
padding-bottom: 0;
}

关于html - 如何调整品牌形象?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20685400/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com