3-3编程练习,觉得自己的代码略为冗杂,请老师帮忙批改看看
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 | *{ margin : 0 ; padding : 0 ; } body{ min-width : 1500px ; } .header{ width : 100% ; height : 100px ; float : left ; background-color : black ; } .img{ width : auto ; height : 100px ; position : relative ; display : inline ; /*border:1px solid red;*/ } .nav{ width : auto ; height : 100px ; display : inline ; position : absolute ; right : 30px ; top : 0px ; line-height : 100px ; /*border: 1px solid red;*/ } .content{ padding : 0 400px 0 400px ; } . middle ,. left ,.login{ position : relative ; float : left ; height : 800px ; /*border: 1px solid red;*/ } .pic{ width : 600px ; height : 400px ; } .left_n{ width : 290px ; height : 400px ; } .form{ width : 380px ; height : 400px ; } .pic,.left_n,.form{ position : absolute ; top : 0 ; bottom : 0px ; left : 0 ; right : 0 ; margin : auto auto ; /*border: 1px solid green;*/ } . middle { width : 100% ; min-width : 700px ; background-color : darkgray; } . left { margin-left : -100% ; left : -400px ; width : 400px ; background-color : antiquewhite; } .login{ margin-left : -400px ; right : -400px ; width : 400px ; background-color : #B2DFEE ; } span{ color : white ; font-family : "微软雅黑" ; padding : 15px ; font-size : 20px ; } . left span,. middle span{ color : black ; line-height : 50px ; margin-left : -10px ; font-size : 15px ; } h 2 { line-height : 50px ; font-family : "黑体" ; } .in_text,.in_pas,. sub { width : 350px ; height : 50px ; line-height : 40px ; margin : 10px 15px ; } . sub { background-color : red ; color : white ; font-size : 18px ; font-family : "微软雅黑" ; } .tail{ width : 100% ; height : 100px ; background-color : black ; text-align : center ; float : left ; bottom : 0px ; /*border: 1px solid blue;*/ } .tail span{ line-height : 100px ; } |
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 | < div class = "header" > < div class = "img" > < img src = "http://img1.sycdn.imooc.com/climg//58c0d2d900016ce303000100.png" /> </ div > < div class = "nav" > < span >课程</ span > < span >职业路径</ span > < span >实战</ span > < span >猿问</ span > < span >手记</ span > </ div > </ div > < div class = "content" > < div class = "middle" > < img class = "pic" src = "http://img1.sycdn.imooc.com/climg//590037e00001fab706000400.jpg" /> </ div > < div class = "left" > < div class = "left_n" > < h2 >课程推荐</ h2 > < span >职业路径 HTML5与CSS3实现动态网页< br /></ span > < span >职业路径 零基础入门Android语法与界面< br /></ span > < span >职业路径 iOS基础语法与常用控件< br /></ span > < span >职业路径 PHP入门开发< br /></ span > < span >职业路径 JAVA入门开发< br /></ span > </ div > </ div > < div class = "login" > < div class = "hr" ></ div > < div class = "form" > < h2 >登录</ h2 > < form > < input type = "text" name = "username" v placeholder = "请输入登录邮箱/手机号" class = "in_text" />< br /> < input type = "password" name = "pasw" placeholder = "6-16位密码,区分大小写,不能用空格" class = "in_pas" />< br /> < input type = "submit" name = "sub" class = "sub" value = "登 录" /> </ form > </ div > </ div > </ div > < div class = "tail" > < span >网站首页</ span > < span >企业合作</ span > < span >人才招聘</ span > < span >联系我们</ span > < span >常见问题</ span > < span >友情链接</ span > </ div > |
看看能不能精练些,或者大家有没有什么建议,总觉得自己写完下来脑子里都不清不楚的
11
收起
正在回答 回答被采纳积分+1
1回答
前端小白入门系列课程
- 参与学习 人
- 提交作业 11218 份
- 解答问题 36712 个
从一个不会编程的小白到一个老司机是需要过程的,首先得入门,学习基础知识,然后才能进阶,最后再到精通,本专题是你走进前端世界的不二选择!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧