Last active
February 6, 2017 08:21
-
-
Save ambar/15d52374bac60cdfd5c6ef7723e48af4 to your computer and use it in GitHub Desktop.
fractional border
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
/* 顶部极细边框(白色背景使用) */ | |
--topLightFractionalBorder { | |
border-top: 1px solid #eee; | |
border-image-source: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1' height='1'><rect width='1' height='.5' fill='#eee'/></svg>"); | |
border-image-slice: 1 0 0; | |
} | |
/* 底部极细边框(白色背景使用) */ | |
--bottomLightFractionalBorder { | |
border-bottom: 1px solid #eee; | |
border-image-source: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1' height='1'><rect width='1' height='.5' y='.5' fill='#eee'/></svg>"); | |
border-image-slice: 0 0 1; | |
} | |
/* 顶部极细边框(黑色背景使用) */ | |
--topDarkFractionalBorder { | |
border-top: 1px solid #333; | |
border-image-source: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1' height='1'><rect width='1' height='.5' fill='#333'/></svg>"); | |
border-image-slice: 1 0 0; | |
} | |
/* 底部极细边框(黑色背景使用) */ | |
--bottomDarkFractionalBorder { | |
border-bottom: 1px solid #333; | |
border-image-source: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1' height='1'><rect width='1' height='.5' y='.5' fill='#333'/></svg>"); | |
border-image-slice: 0 0 1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment