如何在主页上隐藏bootstrap导航栏品牌

时间:2015-05-15 10:35:46

标签: html css twitter-bootstrap

如何在索引页面上隐藏仅在768px宽度之上的bootstrap导航栏品牌。这是在网站响应并更改菜单栏时。

This is the desktop view of the home page and I want to hide the Eat Sleep Kayak text in the top left till it hits the brake point for tablets at 768px

This is the table view.

4 个答案:

答案 0 :(得分:3)

将类.hidden-xs添加到导航栏品牌

答案 1 :(得分:1)

使用媒体查询设置条件。

@media (min-width: 768px) {
.navbar-brand {
  display: none;
 }
}

或在HTML中将hidden-md hidden lg添加到navbar-brand类。

答案 2 :(得分:0)

添加类.visible-xs

Classes Devices 
.visible-xs Extra small (less than 768px) visible 
.visible-sm Small (up to 768 px) visible 
.visible-md Medium (768 px to 991 px) visible 
.visible-lg Larger (992 px and above) visible 
.hidden-xs Extra small (less than 768px) hidden 
.hidden-sm Small (up to 768 px) hidden 
.hidden-md Medium (768 px to 991 px) hidden 
.hidden-lg Larger (992 px and above) hidden 

答案 3 :(得分:0)

仅在index.html或主页中添加此代码。

<style> 
@media (min-width: 768px) {
 .navbar-brand {
    display: none;
 }
}
</style>