开发者

iOs 5 Safari new "reader" feature, how to use it for developers? [duplicate]

This question already has answers here: Closed 10 years ago.

Possible Duplicate:

How to enable iOS 5 Safari Reader on my website?

So iOS 5 Mobile Safari has this new reader feature but I don't understand how it works on my website and what I as a web developer can do to make sure a webpage is "Reader" compatible.

Does开发者_StackOverflow社区 anyone know where I can find docs on this, I understand it's still in beta but there should still be docs somewhere. As far as I can tell by playing with it, its seems to be looking for RSS feeds? Can anyone elaborate?


There isn't really official documentation for it, but you just have to keep a good structure in your HTML. I've found some 3th party documentation here: http://mathiasbynens.be/notes/safari-reader

For example, make use of heading tags for titles.

<h2>This is one item</h2>

You should then either use a DIV or SPAN to wrap your content in.

<span>This is the content that you would see in the reader</span>

What also seems to help is to use class names like "author", "content" or "article" for your content. It will be picked up by the reader. So you would get a result like this:

<h2>My Item</h2>
<span class="author">Some Name</span>
<span class="article">My content.</span>

I've seen websites without RSS feeds and still have the reader option, so that's not necessary.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜