gpt4 book ai didi

html - Kindle Fire 丝绸浏览器阅读 View CSS

转载 作者:技术小花猫 更新时间:2023-10-29 12:21:40 25 4
gpt4 key购买 nike

有谁知道如何为 Kindle Fire Silk 浏览器阅读 View 正确实现 CSS 类?

Kindle Fire 6.3 Update添加了“阅读 View ”:

With Reading View on Silk, the content that you're interested in is elevated above the clutter in a reading-optimized, single screen view (even for multi-page articles). The full page is still available in the background, allowing you to easily toggle back to a traditional view to see other interesting features on the page.

我检查了我的一个网站,它呈现了一个 <div style="display:none;">作为阅读 View 文章,我无法找到有关如何将 silk 浏览器定向到应在阅读 View 中显示的部分的详细信息。

代码示例:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">

<head>
<title>Title</title>
</head>

<body>

<div id='content'>
//important article here
</div>

<div id='sidebar'>
//less important menu here
</div>

<div style='display:none;'>
//lightbox HTML here, not important on mobile devices
</div>

</body>

</html>

如果我找到任何文档,我会更新。

最佳答案

我在 Kindle Fire Silk 浏览器上没有任何这方面的经验,但是我知道 iPhone 具有基于语义 HTML 而不是 CSS 的阅读器功能。如果你使用像

这样的语义布局
<h1>header</h1>
<h2>some text</h2>
<p>a paragraph</p>

然后阅读器功能将适本地显示它。还需要注意的是,CSS 样式已被禁用,而视觉布局是旨在提高可读性的设备标准。我不确定您是否可以直接影响此 View 的样式而无需硬- 在操作系统中对此进行编码。

关于html - Kindle Fire 丝绸浏览器阅读 View CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10216759/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com