2015-12-02 68 views
0

這裏是我的網站在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); 
} 
  1. 一頂欄我想設置背景圖片。我使用了background:url('/ wp-content/themes/day-spa/images/background.png'); 主#masthead {但不工作的

  2. 我要保持高度的報頭相同,但需要將標誌2倍大,則#masthead的高度

請告知

+0

一個CSS預處理器可以爲此做數學計算。 – Aibrean

+0

我能夠添加圖像,但其高度與標頭高度不一樣 – Ghayel

+0

使用CSS [transform](http://www.w3schools.com/css/css3_2dtransforms.asp)'scale()'。這裏是一個[示例](http://www.w3schools.com/css/tryit.asp?filename=trycss3_transform_scale) – Xrait

回答

1

我相信你正在尋找合成你的網站標誌。檢查這是否對你有幫助

.site-logo 
{ 
    !content: '';  
    position: absolute; 
    width: 98px; 
    height: 75px; 
    !top: -32px; 
    left: 5%; 
    !background-color: #FFFFFF; 
}