html nav css设置,nav.html · 关中刀客在青岛/css_css3Basics - Gitee.com

#menu{

position: absolute;

left:-21.5em;

width: 20em;

height: initial;

padding: 15px;

z-index: 10;

border-radius: 15px;

box-shadow: 2px 2px 5px 3px #292929;

background-color: rgb(237, 255, 202);

}

#menu:hover{

left:0em;

}

#menu h1{

margin-top: 0;

margin-bottom: 5px;

}

#menu section{

/*

column-count: 2;!*分成2列*!

column-gap: 2rem;!*分栏的间隙宽度*!

column-rule: 1px dashed #f0d187;!*分栏的间隔线样式*!

*/

}

#menu h2{

margin:3px auto;

counter-increment: mycounter;

counter-reset: mysubcounter;

padding-left: 10px;

font-size: 1em;

font-weight: bold;

text-shadow: 1px 1px 1px darkgray;

color: #191919;

background-color: rgba(146, 230, 169, 0.61);

}

#menu h2:before{

content: "—第"counter(mycounter)"章 ";

font-weight: bold;

/*font-size: 1.8em;*/

}

#menu h2:after{

content: "—";

font-weight: bold;

}

#menu section a{

counter-increment: mysubcounter;

display: block;

padding-left: 10px;

margin: 3px 2em;

/*font-family: 华文宋体, 宋体, serif;*/

font-size: .8em;

font-weight: bold;

text-decoration: none;

/*text-shadow: 1px 1px 1px darkgray;*/

color: #252525;

/*background-color: #a8e2f6;*/

}

#menu section a:before{

font-size: 1em;

content: "☞ 第"counter(mysubcounter)"节 ";

font-weight: bold;

}

#menu section a:after{

content: "";

font-weight: bold;

}

#menu section a:visited{

text-shadow:1px 1px 1px gray;

color: #666;

}

#menu section a:hover{

text-decoration:underline;

}

#menu a:active {test:expression(target="_blank");}

$(function () {

var $menu = $("#menu");

$menu.find("a").hide();

$menu.find("h2").hover(function () {

// $(this).next().find("a").show()

// .parent().siblings().css("color","red");

$(this).siblings().find("a").show()

.end().next().find("a").hide();

})

})

一键复制

编辑

Web IDE

原始数据

按行查看

历史

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值