Skip to content

Instantly share code, notes, and snippets.

@yusureabc
Created November 24, 2017 10:51
Show Gist options
  • Save yusureabc/7988a229e336372aeeb7bf839b9c2870 to your computer and use it in GitHub Desktop.
Save yusureabc/7988a229e336372aeeb7bf839b9c2870 to your computer and use it in GitHub Desktop.
CSS3实现手机页面1px边框(发丝边框)
.panel{
height: 48vmin;
width: 50%;
margin-top: 0px;
margin-bottom: 0px;
border-radius:0px;
color: #ffffff;
position: relative;
border: none;
overflow:hidden;
}
.panel:after
{
content: '';
position: absolute;
top: 0;
left: 0;
border: 1px solid #efefef;
border-bottom: none;
border-left: none;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 200%;
height: 200%;
-webkit-transform: scale(0.5);
transform: scale(0.5);
-webkit-transform-origin: left top;
transform-origin: left top;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment