3-7作业的疑问

来源:3-10 作业题

Rainie丶

2018-03-01 21:24:04

我做出的效果是这样的http://img.mukewang.com/climg/5a97fecd0001387e19190165.jpg

而 预览图是这样的http://img.mukewang.com/climg/5a97fedb0001ab5c12050122.jpg

这是我的代码

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>慕课网</title>
</head>
<body>
    <div align="center">
        <!--顶部-->
        <div style="background-color:#E1F2F9;" width="100px" height="80px">
            <!--慕课网-->
            <div><img src="images\logo.png"/></div>
            <!--导航-->
            <div>
                <table>
                    <tl>
                        <td>学校概况&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td>机构设置&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td>师资队伍&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td>科学研究&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td>招生就业&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td>图书馆&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td>校长信箱&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td>校园导航</td>
                    </tl>
                </table>
            </div>
            <!--快速通道-->
            <div>
                <table>
                    <tr>
                        <td>快速通道:</td>
                        <td>
                            <select>
                                <option>volvo</option>
                            </select>
                            </td>
                    </tr>
                </table>
            </div>
        </div>
        <!--banner图-->
        <div></div>
        <!--新闻区-->
        <div>
            <!--新闻1-->
            <div></div>
            <!--新闻2-->
            <div></div>
            <!--链接-->
            <div></div>
            <!--专题-->
            <div></div>
        </div>
        <!--友情链接-->
        <div></div>
        <!--页脚-->
        <div></div>
    </div>
</body>    
</html>

 请问是为什么,需要什么代码!

写回答

3回答

qq_紫藤追寻_0

2018-03-01

<div>是块级元素,所以会一行一行显示,我做的代码是这样的,不成熟,但是你可以参考一下

<div><!--顶部:顶部用表格布局,一行三列的表格,第一列logo,第二列导航用ul列表也可以嵌套一个表格,第三列快速通道下拉列表-->

<table width="100%" height="85px" bgcolor="#e1f2f9">

<tr>

<td align="left">

<img src="images/logo.png" width="200px" height="80px">

</td>

<td>

<ul style="list-style:none" align="center">

<li style="float:left;width:80px;height:30px;">学校概况</li>

<li style="float:left;width:80px;height:30px;">机构设置</li>

<li style="float:left;width:80px;height:30px;">师资队伍</li>

<li style="float:left;width:80px;height:30px;">科学研究</li>

<li style="float:left;width:80px;height:30px;">招生就业</li>

<li style="float:left;width:80px;height:30px;">图书馆</li>

<li style="float:left;width:80px;height:30px;">校长信箱</li>

<li style="float:left;width:80px;height:30px;">校园导航</li>

</ul>

</td>

<td align="left">快速通道

<select>

<option>apple</option>

<option>pear</option>

<option selected>Volvo</option>

<option>apple</option>

<option>pear</option>

</select>

</td>

</tr>

</table>

</div>

还有 行不是<tl>是<tr></tr>

1

小于飞飞

2018-03-05

上传代码,网页大的布局结构使用 div ,div 要结合css 样式来来答到效果 ,向后学习会学习到css ,现阶段 使用 表格来布局,顶部制作思路:

  1. 创建一行三列的表格。

  2. 第一个单元格放图片。

  3. 第二个单元格在嵌入一个一行8列的表格。

  4. 第三个单元格放下拉菜单。

动手实践,加油!


0

qq_紫藤追寻_0

2018-03-05

<!--头部-->

<table width="100%" height="80px" bgcolor="#e1f2f9">

<tr>

<td width="20%" align="center">

<img src="images/logo.png" alt="logo" width="200px" height="80px"/>

</td>

<td align="center">

<span>学校概况&nbsp;&nbsp;&nbsp;</span>

<span>机构设置&nbsp;&nbsp;&nbsp;</span>

<span>师资队伍&nbsp;&nbsp;&nbsp;</span>

<span>科学研究&nbsp;&nbsp;&nbsp;</span>

<span>招生就业&nbsp;&nbsp;&nbsp;</span>

<span>图书馆&nbsp;&nbsp;&nbsp;</span>

<span>校长信箱&nbsp;&nbsp;&nbsp;</span>

<span>校园导航&nbsp;&nbsp;&nbsp;</span>

</td>

<td width="20%" align="center">快速通道

<select>

<option>apple</option>

<option>pear</option>

<option selected>volvo</option>

<option>apple</option>

<option>pear<option>

</select>

</td>

</tr>

</table>


0

0 学习 · 36712 问题

查看课程