一、 我们制作一个百度首页作为练习,可直接复制该代码保存后缀名为.html来查看
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 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>d93_baidu_home_exercise</title> <style> .header{ height: 250px; /*background-color: red;*/ } .content{ height: 220px; /*background-color: pink;*/ ? } .footer{ height: 200px; /*background-color:green;*/ } div{ text-align: center; } .logo{ background-color:skyblue; height: 130px; } input[type=text]{ width: 400px; height:30px; } input[type=submit]{ width:80px; height:30px; } .content_form{ height:80px; } body{ font-size: 16px; } </style> </head> <body> <div class="header"> <div> <img src="image/baidu_logo.png" alt="" class="logo"> </div> <div class="header_navgitor"> <a href="#">新闻</a> <a href="#">音乐</a> <a href="#">知道</a> <a href="#">文库</a> <a href="#">应用</a> <a href="#">视频</a> <a href="#">地图</a> </div> </div> <div class="content"> <div class="content_form"> <form action="http://www.baidu.com"> <input type="text" name="" id=""> <input type="submit" value="百度一下" > </form> </div> <div> <a href="#">百科</a> <a href="#">文库</a> <a href="#">hao123</a> <a href="#">更多>></a> </div> </div> <div class="footer"> <div> <a href="#">把百度设为首页</a> <a href="#">安装百度卫士</a> </div> <div> <a href="#">加入百度推广</a> | <a href="#">关于百度</a> | <a href="#">About 百度</a> </div> <div> @2019Baidu,使用百度前必读 京ICP证666号 </div> </div> </body> </html> web前端开发学习Q-q-u-n: ⑦⑧④-⑦⑧③-零①②,分享学习的方法和需要注意的小细节,不停更新最新的教程和学习方法(详细的前端项目实战教学视频) |