Icons and pictures (best adaptive scheme)

Source: Internet
Author: User

to set the width and height of the icon, the unit remembers Rem.picture width: max-width:100%;, also give height.srcset= "Mm-width-128px.jpg 1x, mm-width-256px.jpg 2x,mm-width-512px.jpg 3x" >or:
/* Viewport width is not greater than 360 pixels, picture actual size 340 pixels */
If you are using a background map, this is the way:/ * Retina image * /
@media only Screen {. w65 {background-image:url (images/[email protected]);}}
@media only screens and (-webkit-min-device-pixel-ratio:2), only screens and (Min--moz-device-pixel-ratio:2), only Screen and (-o-min-device-pixel-ratio:2/1), only screens and (min-device-pixel-ratio:2), only screens and (Min-resolute: 300DPI), only screen and (min-resolute:2dppx) {. w65 {background-image:url (images/[email protected]);}}Finally, you can refer to the following:http://www.zhangxinxu.com/wordpress/2014/10/responsive-images-srcset-size-w-descriptor/

Icons and pictures (best adaptive scheme)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.