Can I target my Kindle Fire ebook?

Does anyone know of a separate style of power for the Kindle Fire (ebooks)? One that iBooks (iPad) won't read?

I know a method (below) that allows you to target your old Kindle

<style type="text/css" media="amzn-mobi"> p.firstline {margin-top:20px;text-indent:-40px} p.line {text-indent:-40px} </style> 

But I'm looking for a way to target only the Kindle Fire.

amuses

+4
source share
2 answers

According to George Benthien, you can use @media amzn-kf8 for Kindle Fire. Hope this helps.

These media queries apply only to e-books; this does not work for HTML.

I searched for a web solution and resorted to sniffing devices through JS.

This is what I did with jQuery: if( /Silk/i.test(navigator.userAgent) ) { $('html').addClass('kindle'); } if( /Silk/i.test(navigator.userAgent) ) { $('html').addClass('kindle'); }

And then in CSS: html {font-size:143.75%; } html.kindle{font-size:112.5%} html {font-size:143.75%; } html.kindle{font-size:112.5%}

+1
source

From what I read, Kindle / Fire uses a webkit browser, so it's pretty standard compatible (a list of supported HTML and CSS for Kindle can be found here: kindleformatting.com/book/files/KindleHTMLtags.pdf )

You can reverse and target Safari Mobile and make certain elements in the Safari Moble browser different. (Ipad)

 #content { float : left; } [if SafMob]#content { float : none; } 

More information on conditional css can be found here . But I think you're out of luck, which, unfortunately, is specifically designed for the Kindle.

0
source

Source: https://habr.com/ru/post/1393692/


All Articles