导航按钮可见性

时间:2019-05-11 12:44:11

标签: javascript html css

如果屏幕大于991px(991是由于引导程序),我正在尝试隐藏导航栏按钮

我可以使用visibility: hidden隐藏它,但是当我试图使其可见时,它将无法工作。

<div class="lathatosag">
    <button type="button" id="sidebarCollapse" class="btn btn-info">
        <i class="fas fa-align-left"></i>
        <span>Hirdetés kereső</span>
    </button>
</div>

CSS:

.lathatosag{
    visibility: hidden;
}

@media(max-width:991px){
    .lathatosag{
        visibility: visible;
    }
}

1 个答案:

答案 0 :(得分:1)

如果您希望在大于991px的大型设备上显示广告,则需要将媒体查询更改为:

{
  "type": "metric",
  "x": 3,
  "y": 0,
  "width": 3,
  "height": 3,
  "properties": {
    "metrics": [
      [
        "AWS/ApiGateway",
        "Count",
        "ApiName",
        "my-api",
        {
          "stat": "Sum"
        }
      ]
    ],
    "view": "singleValue",
    "region": "eu-west-1",
    "period": 300,
    "title": "Number of api calls"
  }
}