No媒体和media =“all”之间没有差别。在css链接? [英] Is there no difference between No media and media="all" in css link?

查看:216
本文介绍了No媒体和media =“all”之间没有差别。在css链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

没有媒体和media =all之间没有区别?

Is there no difference between No media and media="all"?

<link rel="stylesheet" type="text/css" media="all" href="style.css">

<link rel="stylesheet" type="text/css" href="style.css">


推荐答案

在HTML 4.01 中,默认值为屏幕

在HTML5 中,默认值已更改为 all

In HTML 4.01, the default value is screen.
In HTML5, the default value has been changed to all.

因此,它取决于您在页面中使用的doctype声明。 ,用户代理混淆了标准;见Knu的评论。 (我敢打赌,这就是为什么他们在HTML5中将它改为 all 。)

Therefore, it depends on the doctype declaration you use in your page. Never mind, user agents get confused about standards anyway; see Knu's comment. (I bet this is why they changed it to all in HTML5.)

如果您支持不在数字屏幕上显示页面的用户代理,或显示任何视觉信息。

Then again, this only really matters if you're supporting user agents that don't present pages on digital screens, or display any visual information for that matter.

这篇关于No媒体和media =“all”之间没有差别。在css链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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