为什么我的menu-box宽高都不对,麻烦看一下问题出在哪。图1是我的,图2是老师的
*{ margin: 0; padding: 0; } @font-face{ font-family:"iconfont"; src:url("../img/font/iconfont.eot"); src:url("../img/font/iconfont.eot") format("embedded-opentype"), url("../img/font/iconfont.woff") format("woff"), url("../img/font/iconfont.ttf") format("truetype"), url("../img/font/iconfont.svg#iconfog") format("svg"); } ul{ list-style: none; } a{ text-decoration: none; } a:link,a:visited{ /*text-decoration: none;*/ color: #333; } body{ font-family: "微软雅黑"; color: #14191e; } .main{ width: 1200px; height: 460px; margin: 30px auto; overflow: hidden; position: relative; } .banner{ width: 1200px; height: 460px; overflow: hidden; position: relative; } .banner-slide{ width: 1200px; height: 460px; position: absolute; background-repeat: no-repeat; display: none; } .slide-active{ display: block; } .slide1{ background-image: url("../img/bg1.jpg"); } .slide2{ background-image: url("../img/bg2.jpg"); } .slide3{ background-image: url("../img/bg3.jpg"); } .button{ position: absolute; width: 40px; height: 80px; left: 244px; top: 50%; margin-top: -40px; background: url(../img/arrow.png) no-repeat center center; } .button:hover{ background-color: #333; opacity: 0.8; filter: alpha(opacity=80); } .prev{ transform: rotate(180deg); } .next{ left: auto; right: 0px; } .dots{ position: absolute; right: 20px; bottom: 24px; text-align: right; } .dots span{ display: inline-block; width: 12px; height: 12px; line-height: 12px; border-radius: 50%; background-color: rgba(7,17,27,0.4); box-shadow: 0 0 0 2px rgba(255,255,255,0.8) inset; margin-left: 8px; cursor: pointer; } .dots span.active{ box-shadow: 0 0 0 2px rgba(7,17,27,0.4) inset; background: #fff; } /* 导航菜单 */、 .menu-box{ background: rgba(7,17,27,0.5); opacity: 0.5; width: 244px; height: 460px; position: absolute; left: 0; top: 0; z-index: 1; } .menu-content{ width: 244px; height: 454px; position: absolute; left: 0; top: 0; z-index: 2; padding-top: 6px; } .menu-item{ height: 64px; line-height: 66px; font-size: 16px; padding: 0 24px; position: relative; cursor: pointer; } .menu-item a:link, .menu.item a:visited{ color: #fff; } .menu-item a{ display: block; border-bottom: 1px solid rgba(255,255,255,0.2); padding: 0 8px; height: 63px; } .menu-item i{ position: absolute; right: 32px; font-size: 24px; top:2px; font-family: "iconfont"; font-style: normal; font-weight: normal; color: rgba(255,255,255,0.5) } .sub-menu{ width: 730px; height: 458px; border: 1px solid #d9dde1; background: #fff; position: absolute; left: 244px; top: 0; z-index: 10; box-shadow: 0 4px 8px 0 rgba(0,0,0,0.1); } .inner-box{ width: 100%; height: 100%; background: url("../img/fe.png") no-repeat; display: none; } .sub-inner-box{ width: 652px; margin-left: 40px; overflow: hidden; } .title{ color: #f01414; font-size: 16px; line-height: 16px; margin:28px 0 30px 0; font-weight: bold; } .sub-row{ margin-bottom: 25px; } .bold{ font-weight: bold; } .mr10{ margin-right: 10px; } .ml10{ margin-left: 10px; } .hide{ display: none; }
0
收起
正在回答
2回答
同学你好,反复查看后,发现同学的注释后多了一个"、",去掉就好了。如:
如果我的回答解决了你的疑惑,请采纳。祝:学习愉快~
从网页搭建入门Java Web2018版
- 参与学习 人
- 提交作业 1088 份
- 解答问题 10205 个
如果你有Java语言基础,又想以后从事Java Web开发,那么本路径是你的不二选择!本路径从网页搭建开始入手,通过大量案例来学习Java Web基础。定能助你完成Java Web小白的蜕变!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星