更新时间:2022-12-02 22:42:56
使用 设备宽度
测试屏幕宽度(以px为单位)。然而,这不是完全推荐。请改用 max-width
和 min-width
(视口)。
如果你试图获取屏幕宽度并使用它(类似 content:(device-width); $ c
If you are trying to GET the screen width and use it (something like content: (device-width);
of some sort, that's not possible. Stick with JavaScript.
Manual Reference