html下拉展开内容,html-CSS下拉菜单移动页面内容

您需要清除浮标.

.page-body {

clear: left;

}

演示版

* {

padding: 0;

margin: 0;

}

nav {

background-color: #cccccc;

width: 100%;

height: 80px;

}

ul {

float: left;

}

ul li {

position: relative;

list-style: none;

float: left;

line-height: 80px;

font-size: 20px;

color: #c92d39;

}

ul li a {

display: block;

text-decoration: none;

color: #c92d39;

padding: 0 30px;

}

ul li a:hover {

color: black;

border-bottom: 1px solid #c92d39;

}

ul li:hover ul {

display: block;

}

ul li ul {

display: none;

position: absolute;

background-color: #e5e5e5;

border-radius: 0 0 3px 3px;

}

ul li ul li a:hover {

background-color: #b2b2b2;

color: #c92d39;

border-bottom: none;

}

ul li ul li {

font-size: 15px;

width: 100%;

text-align: center;

}

h1 {

color: #c92d39;

padding: 30px;

}

h2 {

color: #c92d39;

padding: 5px 30px 10px 30px;

}

p {

padding: 0px 30px;

}

a {

text-decoration: none;

}

#logo {

background-color: #cccccc;

padding: 0 51px 0 75px;

font-size: 30px;

font-weight: bold;

}

.page-body {

background-color: #e5e5e5;

clear: left;

}

.wrapper {

margin: 0 300px 0 300px;

padding-left: 0px;

height: 100%;

background-color: white;

}

.footer {

background-color: #cccccc;

width: 100%;

height: 80px;

}

.empty_Box {

height: 1000px;

width: 100%;

}

#contacts {

margin: 0px 0px 0px 60px;

padding: 0 20px;

border-top: 1px solid #cccccc;

}

#contacts:hover {

border-top: 1px solid #c92d39;

}

#copyright {

font-size: 10px;

float: right;

padding: 0px 30px 0 770px;

}

#copyright:hover {

background-color: #cccccc;

}

hi

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值