CSS 媒体类型:如何为移动设备加载 CSS? [英] CSS media type: How to load CSS for mobile?

查看:25
本文介绍了CSS 媒体类型:如何为移动设备加载 CSS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用此代码:

<link rel="stylesheet"
      type="text/css"
      href="media/css/mobile.css"
      media="handheld" />
<link rel="stylesheet"
      type="text/css"
      href="media/css/screen.css"
      media="screen" />

在我的 N78 上,诺基亚的默认浏览器和 Opera mini 加载 screen.css 而不是 mobile.css.
我错过了什么?

on my N78 the nokia's default browser and opera mini load screen.css instead of mobile.css.
What am I missing?

推荐答案

诺基亚 N78 使用 S60 浏览器,它只读取屏幕"样式表.它不会读取手持设备".它不支持媒体查询.与其尝试在此处输入所有内容,不如看看这篇文章,您将解决问题 - http://www.alistapart.com/articles/return-of-the-mobile-stylesheet

Nokia N78 uses the S60 browser, which reads only "screen" stylesheets. It won't read the "handheld". It doesn't support media query. Instead of trying to type everything here, have a look at this article and you will solve the problem - http://www.alistapart.com/articles/return-of-the-mobile-stylesheet

这篇关于CSS 媒体类型:如何为移动设备加载 CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆