老师 帮忙检查下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | <!DOCTYPE html> < html > < head > < meta charset = "UTF-8" > < title >Document</ title > < link rel = "stylesheet" href = "css/grid.css" > < style > *{ padding: 0; margin: 0; box-sizing: border-box; } li{ list-style: none; } a{ text-decoration: none; } .nav-item{ line-height: 70px; margin-left: 20px; cursor: pointer; } .nav-item:hover{ color: red; } .nav-content{ display: -webkit-flex; display: -moz-flex; display: -ms-flex; display: -o-flex; display: flex; } .container{ height: 70px; width: 100%; border-bottom: 1px solid #dadada; } .btn-wrap{ width: 70px; height: 70px; border-radius: 0 100% 0 0; background: red; } .btn-line{ width: 30px; height: 4px; border-radius: 2px; display: block; background: #fff; position: relative; top: 20px; margin: 10px 0; } .row,.logo-wrap,.head-logo,img{ height: 100%; } img{ vertical-align: top; border: none; } .nav-dropdown{ background: #E5E5E5; overflow: hidden; height: 0; transition: all 0.5s; } .nav-dropdown-item{ line-height: 40px; display: block; border-bottom: 1px solid #B0B0B0; text-indent: 20px; color: #666; font-size: 15px; } .no-line{ border: none; } .nav-dropdown-item:hover{ color: red; } .nav-dropdown-item-active{ height: 122px; } </ style > </ head > < body > < div class = "container" > < div class = "row" > < div class = "btn-wrap col-2 d-md-none" id = "btn" > < span class = "btn-line" ></ span > < span class = "btn-line" ></ span > </ div > < div class = "nav-wrap col-md-5 d-none d-md-block" > < ul class = "nav-content" > < li class = "nav-item" >首页</ li > < li class = "nav-item" >关于</ li > < li class = "nav-item" >商业合作</ li > </ ul > </ div > < div class = "logo-wrap col-7 col-offset-3 col-md-offset-0 col-md-7" > < a href = "#" class = "head-logo" > < img src = "img 2/logo.png" alt = "" > </ a > </ div > </ div > </ div > < div class = "nav" > < ul class = "nav-dropdown" id = "nav" > < li >< a href = "#" class = "nav-dropdown-item" >首页</ a ></ li > < li >< a href = "#" class = "nav-dropdown-item" >关于</ a ></ li > < li >< a href = "#" class = "nav-dropdown-item no-line" >商业合作</ a ></ li > </ ul > </ div > < script > btn.onclick=function() { if(nav.classList.contains('nav-dropdown-item-active')){ nav.classList.remove('nav-dropdown-item-active') }else{ nav.classList.add('nav-dropdown-item-active'); } } </ script > </ body > </ html > |
8
收起
正在回答 回答被采纳积分+1
3.WebAPP开发与小程序
- 参与学习 人
- 提交作业 622 份
- 解答问题 6815 个
微信带火了小程序,也让前端工程师有了更多的展现机会,本阶段带你从移动基础知识的学习到webAPP开发,及小程序开发,让你PC端与移动端两端通吃。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧