我相信答案是rel="stylesheet"
,因为它告诉link
标记这个链接的关系是一个样式表。
然而,在测试中,答案是media
(指的是meda="screen"
)。
从技术上讲,我不是正确的吗?
发布于 2016-03-19 00:30:47
我不认为rel
属性(带有stylesheet
值)是正确的答案,因为这个问题询问关于样式表的使用,所以已经假定它是一个样式表(这就是stylesheet
链接类型所传达的信息)。
相关属性包括:
rel
attribute根据值传达关系:- The [`stylesheet` link type](https://www.w3.org/TR/2014/REC-html5-20141028/links.html#link-type-stylesheet) conveys the the linked resource is a **style sheet** for the document.
- If the [`alternate` link type](https://www.w3.org/TR/2014/REC-html5-20141028/links.html#rel-alternate) is provided in addition to `stylesheet`, it conveys that it’s an **alternative style sheet**.
title
attribute提供替代样式表的样式表名为。type
attribute传达链接的资源使用的样式语言(即其MIME类型)。如果未提供该属性,则假定为text/css
。media
attribute指定样式表用于哪些环境/用户代理。我认为media
属性是正确的答案,因为像screen
或print
这样的media queries传达了某种“用法”:使用这个样式表进行打印,使用那个样式表在屏幕上表示。
https://stackoverflow.com/questions/36091057
复制