30个开发人员有用的CSS代码片段整理值得借鉴

2020-04-30 15:03:19易采站长站整理

-moz-transform: skew(-15deg) rotate(-5deg);
-moz-box-shadow: -8px 12px 10px rgba(0, 0, 0, 0.3); }

CSS3模糊文字


.blur {
color: transparent;
text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

修复 IE6/7 margin/padding双倍 间距错误


ul li
{
float: right;
margin-right: 10px;
*display: inline; /*Target IE7 and bellow*/
_display: inline; /*Target IE6 and bellow*/
}
/* This example fixes the double right margin bug */

链接伪类的顺序


a:link {color: blue;}
a:visited {color: purple;}
a:hover {color: red;}
a:active {color: yellow;}

响应布局的HTML Meta标签


<meta name=”viewport” content=”width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no”>
<meta http-equiv=”X-UA-Compatible” content=”IE=edge,chrome=1″>
<meta name=”HandheldFriendly” content=”true”>