Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
Author « Topic »  

jimhuang
Advanced Member

Taiwan
248 Posts

Pre-sales questions only
(More Details...)

Posted - 05/07/2019 :  19:54:35  
I got a bad score 32 of "combine images using CSS sprites" from gtmetrix.com so I go to css.spritegen.com to generates my image and css code as follows:

[size=3]Your Image
Right-click to save this image.[/size=3]
[img]https://3dlens.com/images/sprites.png[/img]
I save the image at /images/sprites.png

[size=3]Your CSS
Save this to your CSS file.[/size=3]
.loyalty-points, .paypal-payment, .rapidssl, .bank-transfer, .china,
.japan, .taiwan, .close, .littlecart1, .minipadlock,
.sreviewcart, .sreviewcarthg
{ display: inline-block; background: url('png.png') no-repeat; overflow: hidden; text-indent: -9999px; text-align: left; }

.loyalty-points { background-position: -2px -0px; width: 72px; height: 34px; }
.paypal-payment { background-position: -2px -36px; width: 68px; height: 34px; }
.rapidssl { background-position: -2px -72px; width: 52px; height: 34px; }
.bank-transfer { background-position: -2px -108px; width: 51px; height: 34px; }
.china { background-position: -2px -144px; width: 30px; height: 20px; }
.japan { background-position: -34px -144px; width: 30px; height: 20px; }
.taiwan { background-position: -2px -166px; width: 30px; height: 20px; }
.close { background-position: -34px -166px; width: 21px; height: 21px; }
.littlecart1 { background-position: -56px -72px; width: 16px; height: 16px; }
.minipadlock { background-position: -56px -90px; width: 16px; height: 16px; }
.sreviewcart { background-position: -55px -108px; width: 12px; height: 12px; }
.sreviewcarthg { background-position: -55px -122px; width: 12px; height: 12px; }

[size=3]Your HTML
Use this to insert your sprite images.[/size=3]
<div class="loyalty-points"></div>
<div class="paypal-payment"></div>
<div class="rapidssl"></div>
<div class="bank-transfer"></div>
<div class="china"></div>
<div class="japan"></div>
<div class="taiwan"></div>
<div class="close"></div>
<div class="littlecart1"></div>
<div class="minipadlock"></div>
<div class="sreviewcart"></div>
<div class="sreviewcarthg"></div>

My question is how to integrate above image and code into my site,
Anyone knows how to do it?

Andy
ECT Moderator

95440 Posts

Posted - 05/08/2019 :  00:08:30  
Hi

To be very honest all that is really going to do is to get you a better score on gtmetrix, any gains for users will be minimal. It's not going to be possible to use the CSS Sprites for the store generated images though. You could try copy and paste with the flags as a test for example.

Andy

Please feel free to review / rate our software
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000