html - css:打印媒体目标

标签 html css

如果我没有在 CSS 引用中特别指定 media="print",例如

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

print.css 是否会在我打印页面时应用其样式(从浏览器:File > Print...)?

而且,如果我只指定 media="print" 而没有指定 screen,当在屏幕上查看页面时,样式会应用吗?

最佳答案

link 中没有 media 属性,CSS 不限于特定的媒体类型,因此将同时用于 screenprint

关于html - css:打印媒体目标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8746223/

相关文章:

html - 在 IE 中打印 html 图

html - 如何保护 html 元素重叠?

html - 在不同表、Mysql、Node.js 中插入多个信息

javascript - onchange 不起作用

javascript - Jquery Waypoints .sticky 方法

css - 检测 css 关键帧何时完成 - Angular

html - 如何使我的 SVG 图像适合父包装 div?

CSS 精确子选择器

jquery 隐藏砌体中除第一个图像之外的所有图像

javascript - 带有自定义 HTML 信息框的多个 Bing map 图钉