Different CSS for different screen size?

2019-06-10 05:53发布

I was searching arround here and I found that I can use one of the following:

Adapt.js or Media Queries

I was wondering what is better to use? I Basically need to resize some specified divs with different width for different screens. (800x600 and 640x480)

If none of mentioned is good, any other solution ? Thank you :)

4条回答
迷人小祖宗
2楼-- · 2019-06-10 06:09

Media Queries are the best solution for you

have a detailed info about these here

查看更多
狗以群分
3楼-- · 2019-06-10 06:13

you might be able to use something like this in CSS

@media only screen and (min-device-width: 768px) {
   ... put your css here
}

The above is probably for mobile devices only

查看更多
对你真心纯属浪费
4楼-- · 2019-06-10 06:24
<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">
查看更多
该账号已被封号
5楼-- · 2019-06-10 06:34

If you are planning to support multiple screens I would recommend using 960 Grid http://960.gs/.

查看更多
登录 后发表回答