- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我对 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/
我整个早上都在为这件小事苦苦挣扎。我尝试使用 Bootstrap 3 将 .navbar-brand 置于整个导航栏的中间。 有人能解开我的谜团吗? 代码:
这个问题在这里已经有了答案: 9年前关闭。 Possible Duplicate: Reshape data from long to wide format R 和: day <- c(1, 1,
如何构建Dockerfile here? 我git clone并运行docker build .。然后我得到以下错误: Sending build context to Docker daemon
我使用 Logic 示例作为引用,将端口作为子级添加到矩形 Figure/EditPart/Model 中。端口 Figures 显示如预期,调试显示 EditParts 和 Models 已创建并添
我在下面给出了显示 9 个框 的代码,这些框的值类似于 digital time, 还有另一个类 box002 显示 digitscurrosponding to the randomly selec
我是一名优秀的程序员,十分优秀!