Frozen UI中提取的半像素边框

时间:2015-01-30 21:09:04   收藏:0   阅读:260
    <style>
       .pxc 
	   {
         <!-- border-top: 1px solid #e0e0e0; -->
         background-position: left top;
         background-image:linear-gradient(to top, transparent 0%,transparent 50%,#e0e0e0 50%,#e0e0e0 100%);
	 background-image: -ms-linear-gradient(bottom, transparent 0%,transparent 50%,  #e0e0e0 50%, #e0e0e0 50%);
	 background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.5, transparent), color-stop(0.5, #e0e0e0), to(#e0e0e0)); 
	 background-repeat: repeat-x;
         -webkit-background-size: 100% 1px;
	  background-size: 100% 1px;
	    }
       </style> 


用腾讯的Frozen UI最大的感悟就是它的半像素,原理就是通过渐变把1像素的下面部分弄成透明,因此只要把各个浏览器的渐变css写上去就可以实现兼容

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!