How to change CSS based on mobile device?

后端 未结 5 2152
一整个雨季
一整个雨季 2021-02-07 05:30

In the following example, I want to display only one div, depending on the device.

I\'m familiar with how to use @media to override a CSS cla

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-07 05:42

    In such simple cases that's all you need:

    
    

    Try to use e.g. width:100% or max-width - rather than fixed widths.

提交回复
热议问题