“预测”有多可靠? CSS 中的媒体类型?

发布于 2024-11-17 07:02:17 字数 390 浏览 3 评论 0原文

我正在开展一个公司项目,创建一个将使用多年的系统。 我最近在 css 中遇到了“投影”媒体类型,我想象它可能为用户带来的潜在好处,进行演示等,但我不知道这是否只是我的想象,或者是否存在这是一个现实世界的优势。到目前为止,我所知道的是某些版本的 Opera 在全屏模式下使用媒体类型。

W3C 媒体类型条目:http://www.w3.org/TR/CSS2/media。 html

在投影仪上使用时,是否有浏览器检测投影媒体类型?

这可能吗?我有预感,对于浏览器来说,投影仪只是一个屏幕,所以没有检测到。如果我错了那就太好了。

有人在投影媒体类型方面取得过成功吗?

I'm working on a corporate project, creating a system that will be used for years.
I've recently come across the "projection" media type in css, and I'm imagining potential benefits it could have for the users, giving presentations, etc, but I don't know if that's just in my imagination, or if there is a real world advantage here. So far all I'm aware of is that some versions of Opera use the media type in fullscreen mode.

W3C media type entries: http://www.w3.org/TR/CSS2/media.html

Does any browser detect the projection media type when being used on a projector?

Is that even possible? I have a hunch that, as far as a browser is concerned, a projector is just a screen, so there's no detection. It would be great if I was wrong.

Has anybody had any success with the projection media type?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

败给现实 2024-11-24 07:02:17

据我的研究显示,投影媒体类型目前仅由 Opera 在全屏模式下使用。

将我的计算机连接到投影仪并在显示设置中将显示模式设置为“投影仪”似乎对任何浏览器选择的样式表都没有影响。

代码风格有一个很好的不同浏览器及其与不同 CSS 媒体模式的兼容性的摘要

As far as my research has shown, the projection media type is only currently used by Opera in fullscreen mode.

Hooking my computer up to a projector and setting the display mode to "projector" in my display settings seems to have no effect on the stylesheet chosen by any browser.

Code Style has a good summary of different browsers and their compatibility with the different CSS Media Modes.

千年*琉璃梦 2024-11-24 07:02:17

我一直使用投影模式,但不幸的是只有 Opera 12 及更早版本实现了它。你按 F11 启动它,然后 CSS 投影媒体启动。

我将每张幻灯片放在一个 div 中,然后使用 CSS:

/* Each slide is a plain div.
   Special pages (intro material, etc,) have classes like cover, intropage, endpage */
body>div {
    border: medium black solid;
    margin: 1em 0;
    width: 40em;
    padding-bottom: 0;
    page-break-inside: avoid;
    overflow: hidden;
 }

@media projection { /* changes/adds the following properties */
    body {font-size: 20pt; margin-left: 0; padding: 0}
    body>div { page-break-after: always; 
               border-style: none; margin: 0; width: 100%}
}

I use projection mode all the time, but unfortunately only Opera 12 and earlier implement it. You hit F11 to start it, and then the CSS projection media kicks in.

I put each slide in a div, and then use the CSS:

/* Each slide is a plain div.
   Special pages (intro material, etc,) have classes like cover, intropage, endpage */
body>div {
    border: medium black solid;
    margin: 1em 0;
    width: 40em;
    padding-bottom: 0;
    page-break-inside: avoid;
    overflow: hidden;
 }

@media projection { /* changes/adds the following properties */
    body {font-size: 20pt; margin-left: 0; padding: 0}
    body>div { page-break-after: always; 
               border-style: none; margin: 0; width: 100%}
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文