Mobile side implementation Border 0.5 pixels

Source: Internet
Author: User

To achieve a solid line of 0.5 pixels on the mobile side, here are the personal practice results

1. Through the background-image gradient effect linear-gradient realization:

<class= "gradient">retina border-bottom 0.5px</p  >
. Gradient {    width: 200px;     height: 20px;     background-position: Left bottom;     background-image:linear-gradient (to Bottom,transparent 50%, #000 50%);     Background-repeat: no-repeat;     background-size: 100% 1px;}

2. Through the Border-image border background map to achieve

 <  p  class  = "Gradient"  >  retina border 0.5px</ p  >  
. Gradient {    width: 240px;     height: 20px;     Border:1px solid #ddd;     border-image: url (data:image/gif;  BASE64,R0LGODLHBQAFAIABAN3D3F///YH5BAEAAAEALAAAAAAFAAUAAAIHHB9PGATNCGA7) 2 stretch;    -webkit-border-image: url (data:image/gif;  BASE64,R0LGODLHBQAFAIABAN3D3F///YH5BAEAAAEALAAAAAAFAAUAAAIHHB9PGATNCGA7) 2 stretch;}

Mobile side implementation Border 0.5 pixels

Related Article

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.