gpt4 book ai didi

javascript - 不同的屏幕尺寸使用不同的 CSS?

转载 作者:太空宇宙 更新时间:2023-11-03 19:53:26 24 4
gpt4 key购买 nike

我在附近搜索,发现我可以使用以下其中一项:

Adapt.js 或媒体查询

我想知道用什么更好?我基本上需要为不同的屏幕调整一些具有不同宽度的指定 div 的大小。 (800x600 和 640x480)

如果提到的都不好,还有其他解决方案吗?谢谢 :)

最佳答案

<link rel="stylesheet" media="all" href="css/common.css">
<!--Responsive style sheets -->
<link rel="stylesheet" media="all and (min-width: 600px) and (max-width: 800px)" href="css/name1.css">
<link rel="stylesheet" media="all and (min-width: 480px) and (max-width: 640px)" href="css/name2.css">

关于javascript - 不同的屏幕尺寸使用不同的 CSS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10616685/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com