Hide A DIV if screen is narrower than 1024px

前端 未结 3 1093
梦谈多话
梦谈多话 2020-12-17 01:14

I found (from this question - Hide div if screen is smaller than a certain width) this piece of coding

  $(document).ready(function () {

    if (screen.widt         


        
3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-17 01:54

    Media queries for the win

    How do I make a div not display, if the browser window is at a certain width?

    @media all and (max-width: 1024px) { /* Change Width Here */
      div.class_name {
         display: none;
      }
    }
    

提交回复
热议问题