html - Responsively scale css-animated logo made up of multiple, overlayed, different-sized images -


so i'm having trouble making multi-image, overlayed, animated logo become responsive.

here recreation of logo: https://jsfiddle.net/vk0w42z6/

i've been struggling few hours now, , have tried could. i've used css transforms, html trickery, , doesn't seem working.

the main problem images differently-sized, can largest image shrink using simple

max-width:90vw; 

but smaller, overlayed images aren't scaling down.

so please me make logo responsive?

things i've tried:

  • make container relative, , children absolute
  • some css display trickery.
  • (will keep adding people recommend things)

well, if absolutely need html/css responsive logo only, i've managed achieve implementation follows: jsfiddle

you can play around percent values until satisfied. should meet of needs.

p.s. removed animation because there lot of unnecessary css there interfering layout. can implement again.

html:

<body style="background-color:#1c1c1c;">   <div style="width:100%;" >     <div style="position: relative; max-width:800px; width: 100%;">      <div id="compass">                     <img alt=" compass-top " id="compass-top"                 class="compass-top " src="http://icanindia.org/go-sxse/medias/img/spoke-only-white.png "                 width="100%" >                   <div style="clear:both;"></div>                 </div>                       <img alt="base-2 "                 class="compass-bottom-2 " src=                 "http://icanindia.org/go-sxse/medias/img/sxse_logo_no_compass.png " style=                 "max-width: 800px; width:100%; height:auto; float:left;" >                             <div style="clear:both;"></div>                          </div>              </div> </body> 

css:

#compass{         width:20%;         position:absolute;         left:37%;         background:url("http://icanindia.org/go-sxse/medias/img/back-only-white.png ");         background-size:100%;         background-repeat:no-repeat;     } 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -