太阳渐渐往下落,它的脸涨得越来越红,红的像个大火球,把身边的云染成五颜六色。慢慢地它走到西山背后,把美丽的霞光留在遥远的天边。我们都看得目瞪口呆。我的心里在想:晚霞真美!
本文实例讲述了CSS实现有立体感的横向按钮式菜单效果代码。分享给大家供大家参考。具体如下:
这是一款横向有立体感的CSS按钮式菜单,采用了CSS常用的UL/LI结构,布局方便,将LI定义为按钮样式,鼠标放上后显示出立体效果,整体视觉体验舒服,代码兼容性好,简洁高效。
运行效果截图如下:
在线演示地址如下:
http://demo.haodaima.com/js/2015/css-r-3d-style-button-menu-codes/
具体代码如下:
复制代码
代码如下:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>横向有立体感的CSS按钮式菜单</title>
<style>
#navigation {
font-family: Arial, Helvetica, sans-serif;
font-size: 9pt;
}
#navigation ul {
list-style: none;
margin: 0;
padding: 0;
padding-top: 4px;
}
#navigation li {
display: inline;
}
#navigation a:link, #navigation a:visited {
margin-right: 2px;
padding: 3px 10px 2px 10px;
color: #A62020;
background-color: #FCE6EA;
text-decoration: none;
border-top: 1px solid #FFFFFF;
border-left: 1px solid #FFFFFF;
border-bottom: 1px solid #717171;
border-right: 1px solid #717171;
}
#navigation a:hover {
border-top: 1px solid #717171;
border-left: 1px solid #717171;
border-bottom: 1px solid #FFFFFF;
border-right: 1px solid #FFFFFF;
}
</style>
</head>
<body id="contact">
<div id="navigation">
<ul>
<li class="recipes"><a rel="nofollow noopener noreferrer" href="#"></a></li>
<li class="contact"><a rel="nofollow noopener noreferrer" href="#">脚本下载</a></li>
<li class="articles"><a rel="nofollow noopener noreferrer" href="#">网页特效</a></li>
<li class="articles"><a rel="nofollow noopener noreferrer" href="#">官方博客</a></li>
<li class="articles"><a rel="nofollow noopener noreferrer" href="#">友情链接</a></li>
<li class="buy"><a rel="nofollow noopener noreferrer" href="#">联系我们</a></li>
</ul>
</div>
</body>
</html>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>横向有立体感的CSS按钮式菜单</title>
<style>
#navigation {
font-family: Arial, Helvetica, sans-serif;
font-size: 9pt;
}
#navigation ul {
list-style: none;
margin: 0;
padding: 0;
padding-top: 4px;
}
#navigation li {
display: inline;
}
#navigation a:link, #navigation a:visited {
margin-right: 2px;
padding: 3px 10px 2px 10px;
color: #A62020;
background-color: #FCE6EA;
text-decoration: none;
border-top: 1px solid #FFFFFF;
border-left: 1px solid #FFFFFF;
border-bottom: 1px solid #717171;
border-right: 1px solid #717171;
}
#navigation a:hover {
border-top: 1px solid #717171;
border-left: 1px solid #717171;
border-bottom: 1px solid #FFFFFF;
border-right: 1px solid #FFFFFF;
}
</style>
</head>
<body id="contact">
<div id="navigation">
<ul>
<li class="recipes"><a rel="nofollow noopener noreferrer" href="#"></a></li>
<li class="contact"><a rel="nofollow noopener noreferrer" href="#">脚本下载</a></li>
<li class="articles"><a rel="nofollow noopener noreferrer" href="#">网页特效</a></li>
<li class="articles"><a rel="nofollow noopener noreferrer" href="#">官方博客</a></li>
<li class="articles"><a rel="nofollow noopener noreferrer" href="#">友情链接</a></li>
<li class="buy"><a rel="nofollow noopener noreferrer" href="#">联系我们</a></li>
</ul>
</div>
</body>
</html>
希望本文所述对大家的css网页设计有所帮助。
本文CSS如何实现有立体感的横向按钮式菜单效果代码到此结束。如果说青春也有缺点,那就是它消失得太快。小编再次感谢大家对我们的支持!