View Single Post
Old 01-11-2020, 05:36 PM   #1
rjwse@aol.com
Addict
rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.
 
rjwse@aol.com's Avatar
 
Posts: 329
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
endlessly moving gapless banner

<style>*{margin:0;padding:0;}@keyframes ani{0%{background-position: 0 0;}100%{background-position: 100vw 0;}} div{background:url("1.jpeg") repeat-x 0 / 100% auto /*set at 50 & 25 to see result*/; height:calc(125/150*100vw); /*h/w as %*/ animation: ani 20s linear infinite;} </style>

<div></div>

<p>note: the actual bannered and seamless and gapless image appears between the empty div pairs (which is sort of strange). </p><br/>
<p>Get HxW of img by clicking any img in book. </p><br/>
<p>This syntax of url("") will not autocomplete and you have to type in filename of img.</p>

You can copy and paste the above into the calibre editor's snippet management list. When you type bannerimg2 followed by ctrl-j the above code expands in the editor. As soon as it lands, the moving banner will appear. You must select an image in your book and type its name into the placeholder $1. The style command only will work in the single xhtml segment being viewed UNLESS you put it into the stylesheet. Enclosed are 2 pictures, one showing the snippet, the other showing the banner mid-change. Best regards, Pop
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2020-01-11 16-22-02.png
Views:	99
Size:	176.6 KB
ID:	176341   Click image for larger version

Name:	Screenshot from 2020-01-11 16-07-07.png
Views:	156
Size:	544.8 KB
ID:	176342  
rjwse@aol.com is offline   Reply With Quote