CSS实现的一个简单时尚的左侧导航

所属分类: 网页制作 / CSS 阅读数: 762
收藏 0 赞 0 分享
 

简单的左侧导航 代码如下:

复制代码
代码如下:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>测试</title>
<link rel="stylesheet" type="text/css" href="css/xt_css.css" />
</head>
<body>
<!--
作者:小湉
网址:http://xtian.me
时间:2013-11
-->

<div class="wmenu">
<dl>
<dt class="user"><a href="#">用户管理</a></dt>
<dd><a href="http://xtian.me">基本资料</a></dd>
<dd><a href="http://xtian.me">邮箱管理</a></dd>
<dd><a href="http://xtian.me">密码管理</a></dd>
</dl>
<dl>
<dt class="edit"><a href="#">编辑管理</a></dt>
<dd><a href="http://xtian.me">发布广告管理</a></dd>
</dl>
</div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript">
$('.wmenu dl dt').click(function(){
$(this).toggleClass('icotop');
$(this).siblings('dd').toggleClass('hidden');
});
</script>
</body>
</html>

CSS如下:


复制代码
代码如下:

/**
作者:小湉
网址:http://xtian.me
时间:2013-11
**/
/**清理边距**/
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td { margin:0px; padding:0px; }
/**默认字体**/
body,button,input,select,textarea { font:12px/1.5 宋体,arial,sans-serif; }
h1,h2,h3,h4,h5,h6 { font-size:100%; }
address,cite,dfn,em,var { font-style:normal; }
code,kbd,pre,samp { font-family:courier new,courier,monospace; }
small { font-size:12px; }
ul,ol,li { list-style:none; }
a { text-decoration:none; }
a:hvoer { text-decoration:underline; }
sup { vertical-align:text-top; }
sub { vertical-align:text-bottom; }
legend { color:#000; }
fieldset,img { border:0px; }
button,input,select,textarea{ font-size:100%; }
table { border-collapse:collapse; border-spacing:0; }
/**重置**/
.invisible { visibility:hidden; }
.noBg { background:none !important; }
.clear { display:block; height:0; overflow:hidden; clear:both; }
.clearfix:after { content:'\20'; display:block; height:0; clear:both; }
.clearfix { *zoom:1; }
/**页面样式**/
.hidden { display:none; }
.wmenu dt ,.wmenu dt a,.wmenu dd a:hover ,a.currcent {background:url(../images/w_base_z.png) no-repeat;}
.wmenu {height:500px;width:190px; border:1px solid #d1d1d1; background:#f3f3f3;}
.wmenu dl{border-bottom:1px solid #d1d1d1; }
.wmenu dt {height:41px;line-height:41px;border-bottom:1px solid #d1d1d1; text-align:left; background-position:153px -56px;}
.wmenu dt a{display:block; padding-left:48px; font-size:16px; color:#444343;}
.wmenu dt.user a{ background-position:18px -22px;}
.wmenu dt.edit a{ background-position:18px 12px;}
.icotop { border:none !important; background-position:153px -90px !important;}
.wmenu dd {line-height:37px;}
.wmenu dd a{display:block;padding-left:50px; font-size:14px; color:#362c30;}
.wmenu dd a:hover ,a.currcent{display:block;padding-left:50px; color:#fff !important;background-repeat:repeat-x;background-position:left bottom;}
更多精彩内容其他人还在看

CSS3实现背景透明文字不透明的示例代码

这篇文章主要介绍了CSS3实现背景透明文字不透明的示例代码的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享

浅谈CSS中的尺寸单位

这篇文章主要介绍了浅谈CSS中的尺寸单位的相关资料,浏览器的兼容性越来越好,移动端基本是清一色的webkit,经常会用到css的不同尺寸/长度单位,这里做个整理。感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

CSS中有些属性的前面会加上“*”或“_”所代表的意思

这篇文章主要介绍了CSS中有些属性的前面会加上“*”或“_”所代表的意思,需要的朋友可以参考下
收藏 0 赞 0 分享

CSS 设置滚动条样式的实例代码

这篇文章主要介绍了CSS 设置滚动条样式的实例代码,非常不错,具有一定的参考借鉴价值,需要的朋友参考下吧
收藏 0 赞 0 分享

纯CSS制作各种各样的网页图标(三角形、暂停按钮、下载箭头、加号等)

这篇文章主要介绍了纯CSS制作各种各样的网页图标(三角形、暂停按钮、下载箭头、加号等)的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享

纯css实现多级折叠菜单折叠树效果

这篇文章主要介绍了纯css实现多级折叠菜单折叠树效果,运用checkbox的checked值来判断下级栏目是否展开,通过css3选择器提供的checked伪类来实现此效果,感兴趣的朋友参考下吧
收藏 0 赞 0 分享

CSS Grid 网格布局全解析

这篇文章主要介绍了CSS Grid 网格布局全解析的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享

css flex 弹性布局详解

这篇文章主要介绍了css flex 弹性布局详解的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享

CSS3 二级导航菜单的制作的示例

这篇文章主要介绍了CSS3 二级导航的制作的示例的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享

使用css禁用input、checkbox、select等html控件实现disable效果

这篇文章主要介绍了使用css禁用input、checkbox、select等html控件实现disable效果,需要的朋友可以参考下
收藏 0 赞 0 分享
查看更多