html增加二级栏目,html做二级栏目,我跟着视频做的,但是我的二级栏目被标题覆盖了,为什么?...

本文介绍了使用HTML和CSS进行网页布局的技巧,包括创建一个固定在左侧的导航栏。内容涉及清除默认边距和填充,设置页面背景色,以及导航栏的样式设计,如颜色、字体和边框。导航栏包含二级栏目,使用了列表元素进行结构化,并实现了二级菜单的样式。
摘要由CSDN通过智能技术生成

html>

*{

margin: 0;

padding: 0;

}

.page{

width: 100%;

height: 4000px;

background-color: yellow;

}

.nav{

width: 160px;

height: auto;

position: fixed;

left: 0;

top: 50%;

margin-top:-103px ;

}

.nav-li{

width: 160px;

height: 40px;

border-bottom: 1px solid #fff;

text-align: center;

line-height: 40px;

color: #fff;

font-size: 16px;

background-color: #333;

}

.nav-li ul{

width: 160px;

height: auto;

}

.nav-li ul li{

width: 160px;

height: 40px;

border-bottom: 1px dashed #666;

color: #333;

text-align: center;

line-height: 40px;

background-color: white;

}

标题
  • 二级栏目
标题
标题
标题
标题
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值