gpt4 book ai didi

css - Birdseye Weebly 主题 - 使移动 Logo 更大并居中

转载 作者:行者123 更新时间:2023-11-28 04:35:54 25 4
gpt4 key购买 nike

我涉足编码,正在开发一个 Weebly Birdseye 网站。 Logo 在桌面上看起来很棒,但在移动标题中很小。我希望它更大并且居中。任何建议表示赞赏!这是页眉的 CSS(首先是桌面网站,然后是移动网站):

/* Header */
.birdseye-header {
position: fixed;
z-index: 12;
overflow-y: hidden;
width: 100%;
padding: 10px 10px;
box-sizing: border-box;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
-webkit-transition: all 250ms ease;
-moz-transition: all 250ms ease;
-ms-transition: all 250ms ease;
-o-transition: all 250ms ease;
transition: all 250ms ease;
}
.birdseye-header .container {
display: table;
overflow-y: hidden;
width: 100%;
max-height: 100px;
}
.birdseye-header label.hamburger {
display: none;
}
.birdseye-header .logo {
display: table-cell;
overflow-y: hidden;
margin-right: 30px;
padding: 0;
vertical-align: middle;
line-height: normal;
}
.birdseye-header .logo a {
display: block;
margin-right: 30px;
margin-left: 10px;
color: #ffffff;
text-transform: uppercase;
letter-spacing: 0.03em;
font-family: 'Open Sans', sans-serif;
font-size: 24px;
font-weight: 600;
line-height: normal;
}
.birdseye-header .logo img {
display: block;
overflow: hidden;
max-width: 400px;
max-height: 300px;
}

/* Header */
.birdseye-header {
min-height: 40px;
padding: 10px 10px;
background: rgba(255, 248, 220, 0.95);
}
.birdseye-header .logo {
overflow: hidden;
padding-right: 8px;
}
.birdseye-header .logo a {
margin-left: 0;
margin-right: 0;
font-size: 1.1em;
line-height: 1.4em;
}
.birdseye-header .logo img {
max-height: 400px;
vertical-align: middle;
}
.birdseye-header .logo #wsite-title {
display: block;
max-width: 100%;
font-size: 1.1em !important;
line-height: 1.4em !important;
}
.birdseye-header .container {
min-height: 40px;}

最佳答案

看起来你已经改变了 .birdseye-header .container { from max-height: 80px;到最大高度:100%;所以这是一个好的开始。

媒体屏幕...

@media screen and (max-width: 992px) {
.birdseye-header .birdseye-header, .birdseye-header .logo, .birdseye-header .logo img {
max-height: 40px;
}
}

...导致图像缩小,因此您需要创建 max-height: 40px;到您喜欢的像素大小。可能是 80px 之类的

**但是,我应该注意,.banner-wrap .container 填充可能需要/也应该从 60px 更改为 Logo 的高度。

@media screen and (max-width: 992px) {
.banner-wrap .container {
padding: 60px 20px;
}
}




至于让 Logo 居中,你应该可以这样做:

@media screen and (max-width: 992px) {
.birdseye-header .logo img {
margin: 0 auto;
}
}

关于css - Birdseye Weebly 主题 - 使移动 Logo 更大并居中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41476816/

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