侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

第一次制作网页,仿了百度首页,大有收获

2024-05-13 星期一 / 0 评论 / 0 点赞 / 84 阅读 / 5983 字

没有一点思路,不知道如何布局,不知道怎么开始,就是一块一块的做,一会写CSS,一会写标签的,不知道的,还要查百度。做完后,感觉进步极大,真的有很多自己的领悟,最重要知道了一开始应该去分块,如何去定位。

       没有一点思路,不知道如何布局,不知道怎么开始,就是一块一块的做,一会写CSS,一会写标签的,不知道的,还要查百度。做完后,感觉进步极大,真的有很多自己的领悟,最重要知道了一开始应该去分块,如何去定位。收获就是练习了一些基础。

      做完后,我去百度,发现有许多人也做了百度首页,得到了许多启发,验证了许多想法,于是,我准备再做一次百度首页,重新做,使它变得精简,美观,模仿的更像,加油!

       本来准备把成果放在前边,结果发现不好操作,就放最下边了,这是代码(非常不简洁,有许多东西不知道怎么弄,比如一开始的字体,直接谷歌审查元素,复制了一些,原谅我这苯脑子啊,散步到这里的各位,万望提出宝贵建议,谢谢):

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>百度一下,你就知道</title>
<style type="text/css">
.right
 { 
float:right;
  }
a.le
 {
color: rgb(51, 51, 51);
cursor: auto;
display: block;
float: left;
font-family: arial;
font-size: 13px;
font-style: normal;
font-variant: normal;
font-weight: bold;
height: 35px;
line-height: 24px;
list-style-image: none;
list-style-position: outside;
list-style-type: none;
margin-left: 20px;
text-align: center;
text-decoration: underline;
width: 28px;
 }
a.we
 {
 color:#000000;
 cursor:auto;
 display:block;
 float:left;
 font-family:arial;
 font-size:13px;
 font-style:normal;
 font-weight:nomal;
 height:25px;
 line-hight:24px;
 list-style-image:none;
 list-style-position:outside;
 list-style-type:none;
 margin-left:20px;
 text-align:center;
 text-decoration:underline;
 width:28px;
 }
 a.se
 {
 border-bottom-color: rgb(240, 240, 240);
border-bottom-style: solid;
border-bottom-width: 1px;
color:#FFFFFF;
background:#0033FF;
cursor: default;
display: block;
font-family: arial;
font-size: 13px;
font-style: normal;
font-variant: normal;
font-weight: normal;
height: 22px;
line-height: 10px;
list-style-image: none;
list-style-position: outside;
list-style-type: none;
margin-bottom: 0px;
margin-left: auto;
margin-right: auto;
margin-top: 0px;
padding-top: 6px;
text-align: center;
width: 66px;
text-decoration:none;
 }
a.me
{
color:#999999;
font-family:arial;
font-size:12px;
}
p
{
color:#999999;
font-family:arial;
font-size:12px;
}
#search
 { 
 position:absolute;
 left:400px;
 top:220px;
    }
#search1
 { 
 position:absolute;
 left:860px;
 top:220px;
    }
img
{
    border: 0;
    width: 270px;
    height: 129px;
    }
div#ing
{
position: absolute;
left:530px;
 top:70px;
}
#foot
{
    width:100%;
    position:absolute;
    bottom:130px;
    }
#foot>.link
{
    text-align:center;
    margin-bottom:10px;
    }
.copyright{
    text-align:center;
    }
</style>
</head>

<body>
<table frame=void class="right"> 
<tr>
<td><a href="#" class="le">糯米</a></td>
<td><a href="#" class="le">新闻</a></td>
<td><a href="#" class="le">hao123</a></td>
<td><a href="#" class="le">地图</a></td>
<td><a href="#" class="le">视频</a></td>
<td><a href="#" class="le">贴吧</a></td>
<td><a href="#" class="we">登陆</a></td>
<td><a href="#" class="we">设置</a></td>
<td><a href="#" class="se">更多产品</a></td>
</tr>
</table>
<div id="ing">
<img src="https://www.baidu.com/img/bd_logo1.png" /img>
</div>
<form id="search">
<input name="" type="text" style="width:520px ;height:28px" />
</textarea>
</form>
<form id="search1">
<input type="button" value="百度一下" style="width:100px;height:34px;background:#0033FF;color:#FFFFFF;border:0;">
</form>
<div id="foot">
<div class="link">
<a href="#" class="me">把百度设为主页</a> &nbsp;
<a href="#" class="me">关于百度</a>&nbsp;&nbsp;
<a href="#" class="me">About Baidu</a>
        <p>
            2015 Baidu <a href="#"class=>使用百度前必读</a> <a href="#">意见反馈</a> 京ICP证030173号 
        </p>
    </div>
</body>
</html>
 

广告 广告

评论区