View Single Post
Old 06-11-2018, 05:56 PM   #29
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,830
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by DiapDealer View Post
Seems webkit likes to have the border-attachment property explicitly set to "fixed" (as opposed to the default "scroll") for the effect to work.

Code:
body {
     margin: 0;
     padding: 0;
     background: url("../Images/banlv%40k3.jpg");
     background-size: contain;
     background-repeat: no-repeat;
     background-position: 50% 50%;
     background-attachment: fixed;
}
Brilliant!! With that addition, the background works under Kindle (.kf8, .kfx) without text added. And it is showed not only in Sigil, but also with the Calibre Editor (the Calibre Viewer already showed fine the background).
So, the conclusion is that if we are building an ebook for the Kindle platform, we must add "background-attachment: fixed;" and if we are building an ebook for RMSDK, then we mustn't.

Many thanks Diap, you found a black pearl.
RbnJrg is offline   Reply With Quote