Box-shadow Implementing a mobile (retina) ultra-fine border

Source: Internet
Author: User

//box- Shadow projection Direction // on box-shadow:  inset 0px 1px 0px 0px #000//  right box-shadow:  inset-1px 0px 0px 0p x #000; // under box-shadow:  inset 0px-1px 0px 0px #000; // left Box-shadow:  inset 1px 0px 0px 0px #000;

The effect is as follows:

Because 1px in CSS is not equal to the 1px of a mobile device, these are different pixel densities due to different phones.

There is a Devicepixelratio property in the Window object that reflects the pixels in the CSS to the pixel ratio of the device.

The official definition of devicepixelratio is the proportion of device physical pixels and device independent pixels, i.e. Devicepixelratio = physical pixels/independent pixels.

More workarounds See: http://www.jianshu.com/p/7e63f5a32636

Box-shadow Implementing a mobile (retina) ultra-fine border

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.