Media Queries: How to target desktop, tablet, and mobile?

前端 未结 16 1890
清酒与你
清酒与你 2020-11-21 04:53

I have been doing some research on media queries and I still don\'t quite understand how to target devices of certain sizes.

I want to be able to target desktop, ta

16条回答
  •  一整个雨季
    2020-11-21 05:12

    The behavior does not change on desktop. But on tablets and mobiles, I expand the navbar to cover the big logo image. Note: Use the margin (top and bottom) as much as you need for your logo height.

    For my case, 60px top and bottom worked perfectly!

    @media (max-width:768px) { 
      .navbar-toggle {
          margin: 60px 0;
      }
    }
    

    Check the navbar here.

提交回复
热议问题