2016-12-06 57 views
0

如何在我們處於移動視圖時修改我的頭以隱藏徽標元素?當不在桌面版本時隱藏徽標

<style type="text/css"> 
/*<![CDATA[*/ 
.jtpl-logo { 
    padding: 0 30px; 
    width: 250px; 
    transition: all 0,5s ease 0s !important; 
    position: fixed; 
    z-index: 1000000; 
    min-width: 0000px; 
    overflow: visible; 
} 
.jtpl-navigation { 
    transition: all 0.5s ease 0s !important; 
    position: fixed; 
    width: 100%; 
    z-index: 100000; 
    text-align: center; 
    padding-left: 300px; 
    background-color: #e30613; 
} 

/*]]>*/ 
</style> 

現在,我已經使用了頭固定導航欄和標識元素滾動時留在上面。現在,如果我們可以在移動視圖中告訴徽標容器可以移除,或者可以告訴我們何時小於768px的屏幕寬度,那將是完美的。

這可能嗎?我發現,與jimdo結合尋找這個提示是一件非常忙碌的事情。

回答

1

要在桌面上使用@media隱藏像

@media (min-width:961px) { 
.jtpl-logo { 
    display: none; 
} 
} 

比其他桌面使用下面的標籤

@media (min-width:320px) { /* smartphones, iPhone, portrait 480x320 phones */ } 
@media (min-width:481px) { /* portrait e-readers (Nook/Kindle), smaller tablets @ 600 or @ 640 wide. */ } 
@media (min-width:641px) { /* portrait tablets, portrait iPad, landscape e-readers, landscape 800x480 or 854x480 phones */ } 
@media (min-width:961px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ } 
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ } 
@media (min-width:1281px) { /* hi-res laptops and desktops */ } 

.jtpl-logo { 
 
    padding: 0 30px; 
 
    width: 250px; 
 
    transition: all 0,5s ease 0s !important; 
 
    position: fixed; 
 
    z-index: 1000000; 
 
    min-width: 0000px; 
 
    overflow: visible; 
 
} 
 
.jtpl-navigation { 
 
    transition: all 0.5s ease 0s !important; 
 
    position: fixed; 
 
    width: 100%; 
 
    z-index: 100000; 
 
    text-align: center; 
 
    padding-left: 300px; 
 
    background-color: #e30613; 
 
} 
 
@media (min-width:961px) { 
 
.jtpl-logo { 
 
    display: none; 
 
} 
 
}
<div class="jtpl-logo"> 
 
    </div>