上一节作业,怎么才能做到响应式?求批改

上一节作业,怎么才能做到响应式?求批改

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
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title></title>
  <style type="text/css">
    /*此处写代码*/
    body, div, ul, li ,img{
        padding: 0;
        margin: 0;
        font-size: 24px;
        font-family: 'Microsoft Yahei';
    }
 
    .container {
        width: 100%;
        height: 100px;
        background: #000;
      position: fixed;
      top:0;
      left:0;
        /*position: absolute;
        top: 50%;
        left: 50%;
        margin-left: -550px;
        margin-top: -50px;*/
 
    }
 
    .container img {
        cursor: pointer;
    }
 
    .nav {
        display: inline-block;
        width: 800px;
        height: 100px;
    }
 
    .nav ul {
        list-style-type: none;
          position: absolute;
          top: 0;
          right: 10px;
 
    }
 
    .nav ul li {
          display: inline-block;
          float: left;
          text-align: center;
          line-height: 100px;
          padding: 0 34px;
          cursor: pointer;
    }
 
    a {
        text-decoration: none;
        color: #fff;
    }
 
     ul li:hover {
        background: #14191e;
    }
     
    .ad {
      width:100%;
    }
 
    .ad img {
      width:100%;
      margin: 0;
    }
 
    .footer {
        width: 100%;
        height:100px;
        background: #000;
        text-align:center;
        line-height: 100px;
        font-size:16px;
      position: fixed;
      left: 0;
      bottom: 0;
    }
    .footer a {
       margin-left: 20px;
    }
    .footer a:nth-child(1) {
       margin-left: 0px;
    }
  </style>
</head>
<body>
  <!-- 此处写代码 -->
  <div class="container">
      <img src="http://img1.sycdn.imooc.com/climg//58c0d2d900016ce303000100.png" alt="" >
      <div class="nav">
         <ul>
            <li><a href="#">课程</a></li>
            <li><a href="#">职业路径</a></li>
            <li><a href="#">实战</a></li>
            <li><a href="#">袁问</a></li>
            <li><a href="#">手记</a></li>
         </ul>
      </div>
  </div>
  <div class="ad">
     <img src="http://img1.sycdn.imooc.com/climg//58c0eda50001e12416000480.jpg" alt="">
     <img src="http://img1.sycdn.imooc.com/climg//58c0edb80001c9f216000480.jpg" alt="">
     <img src="http://img1.sycdn.imooc.com/climg//58c0edc9000100d516000480.jpg" alt="">
  </div>
 
  <div class="footer">
        <a href="#">网页首页</a>
        <a href="#">企业合作</a>
        <a href="#">人才招聘</a>
        <a href="#">联系我们</a>
        <a href="#">常见问题</a>
        <a href="#">友情链接</a>
  </div>
</body>
</html>


正在回答

登陆购买课程后可参与讨论,去登陆

1回答

不需要做响应式,这里不做要求,因为响应式是一个大的学习模块,现在还没有学,所以不用做,进阶路径中会有一个步骤的周期来学习响应式,到时候好好学,学完之后就可以做响应式了。如果你现在想学的话,可以查一下@media,祝学习愉快!

  • highcker 提问者 #1
    好吧 等学到响应式再来问
    2017-07-15 13:57:18
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师
插入代码