如何在头部添加背景图片2倍大标志
问题描述:
这里是我的网站在WordPress如何在头部添加背景图片2倍大标志
/* Masthead */
#masthead {
position: absolute;
top: 0;
background: rgba(109, 104, 110, 0.9);
border-top: 10px solid #125CAA;
}
body.admin-bar #masthead {
top: 0px;
}
header#masthead.row {
width: 100%;
margin: 0;
z-index: 99999;
}
.site-logo {
padding: 5px 0;
}
#masthead .right-nav {
float: right;
}
#masthead .left-nav {
float: left;
}
#masthead .right-nav > li,
#masthead .left-nav > li {
display: inline-block;
position: relative;
top: 28px;
font-size: 18px;
}
#masthead .right-nav li a,
#masthead .left-nav > li a {
color: #fff;
}
li.search {
margin: 0 20px 0 0;
}
.show-hide {
display: none !important;
}
/* Masthead Sticky */
#masthead-placeholder {
display: none;
height: 0;
}
#masthead.sticky {
/*top: 0;*/
position: fixed;
background: rgba(109, 104, 110, 0.9);
}
一顶栏我想设置背景图片。我使用了background:url('/ wp-content/themes/day-spa/images/background.png'); 主#masthead {但不工作的
我要保持高度的报头相同,但需要将标志2倍大,则#masthead的高度
请告知
答
我相信你正在寻找合成你的网站标志。检查这是否对你有帮助
.site-logo
{
!content: '';
position: absolute;
width: 98px;
height: 75px;
!top: -32px;
left: 5%;
!background-color: #FFFFFF;
}
一个CSS预处理器可以为此做数学计算。 – Aibrean
我能够添加图像,但其高度与标头高度不一样 – Ghayel
使用CSS [transform](http://www.w3schools.com/css/css3_2dtransforms.asp)'scale()'。这里是一个[示例](http://www.w3schools.com/css/tryit.asp?filename=trycss3_transform_scale) – Xrait