将备用样式表应用于手持设备,无法正常工作 [英] apply alternate style sheet to handheld, not working right

查看:96
本文介绍了将备用样式表应用于手持设备,无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面的两个样式表。

I have two style sheets for one page.

<link rel="stylesheet" href="css/lsharecomplete_mob.css" media="handheld" type="text/css" />
<link rel="stylesheet" href="css/lsharecomplete_dt.css" type="text/css" media="Screen" />

我在Android和Iphone上测试,两者似乎都在拾起屏幕风格。
最好在一个样式表中使用@media,而不是使用备用表或者我做错了。

I am testing on android and Iphone, and both seem to be picking up the "screen" style. Is it better to use @media in one style sheet instead of using alternate sheets or am I doing something wrong.

我已经检查过链接和服务器目录

I have checked the link and server directories to make sure the files existed and where linked properly.

推荐答案

iPhone的移动Safari不考虑自己的手持媒体

iPhone's Mobile Safari doesn't consider itself of the "handheld" media type.


iOS会忽略列印和手持媒体查询,因为这些类型不提供高阶网页内容。因此,请使用iOS的屏幕媒体类型查询。

iOS ignores print and handheld media queries because these types do not supply high-end web content. Therefore, use the screen media type query for iOS.

来源

而是使用媒体查询

这篇关于将备用样式表应用于手持设备,无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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