看看这两行字有木有立体的效果:个性菜单
鼠标经过之前
鼠标经过时:
每天学习一点点
上代码
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
background:#EFEFEF;
}
p.first {
font-size:48px;
color: #D1D1D1;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
text-shadow: -1px -1px #333,
1px 1px #FFF;
}
p.second {
font-size:48px;
color: #D1D1D1;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
text-shadow: -1px -1px #FFF,
1px 1px #333;
}
ul {
position: relative;
}
li {
list-style: none;
line-height:30px;
background:#000;
height: 30px;
width:100px; margin:0;
display:block;
float:left;
}
a { display: inline-block;
color:#FFF;
font-family:"微软雅黑";
text-decoration:none;
height: 30px;
width:100px;
text-align: center;
color: #FFF;
background: #F00;
font-size: 15px;
transition: all 0.25s ease-in
}
a:hover {
text-decoration:none;
transform: matrix(1, 0.2, 0, 1, 0, 0);
-moz-transform: matrix(1, 0.2, 0, 1, 0, 0);
-ms-transform: matrix(1, 0.2, 0, 1, 0, 0);
-o-transform: matrix(1, 0.2, 0, 1, 0, 0);
-webkit-transform: matrix(1, 0.2, 0, 1, 0, 0);
background: #DFDFDF;
color:#000;
}
-->
</style>
</head>
<body>
<p class="first">Text shadow</p>
<p class="second">Text shadow</p>
<br />
<ul>
<li><a href="#">首页</a></li>
<li><a href="#">产品介绍</a></li>
<li><a href="#">技术支持</a></li>
<li><a href="#">联系我们</a></li>
</ul>
</body>
</html>