Skip to content
  • articles
  • cats
    • Main
    • Code
    • OS
    • Apps
    • Network

zilli³

IT

Responsive

W3C compliant optimization for retina display images @2x.png

March 21, 2015December 1, 2014 by Zilli

How to insert a picture 2x retina display with W3C compliant rules,
the image is displayed with the size of the css to 50% of actual size.

// HTML
<img src="/logo@2x.png" alt="logo" id="PNGlogo" width="200" height="200">

// CSS
#PNGlogo {
	width:100px;
	height:100px;
}
Categories Code Tags HTML5, Responsive, W3C
  • articles
  • cats
    • Main
    • Code
    • OS
    • Apps
    • Network
© 2023 zilli³ • Built with GeneratePress