Image size browser height - X number of pixels. CSS-only! -


i'm looking css-only solution, shrink image size of browser window - x amount of pixels. i've found quite lot javascript solutions, want make css-only. can done , if yes, how?

how this?

live demo

html:

<div><img src="http://www.google.com/images/logos/ps_logo2.png" /></div> 

css:

div {     position: absolute;     top: 30px;     left: 30px;     right: 30px } img {     width: 100% } 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -