菜鸟学习笔记:html基础实战操作

结合所学内容,制作一个简单网站首页

难点:
  • div布局
  • 表单制作
页面实现效果
页面实现效果
贴代码

html部分

<!doctype html>
<html lang="zh-CN">
    <head>
        <title>实验楼</title>
        <meta charset="utf-8">
        <link rel="stylesheet" href="./styles/style.css">
    </head>
    <body>
        <div id="container">
            <div id="header">
                <br>
                <h1>Colorful Shi yan Lou</h1>
                <a href="#con">contact us</a>
            </div>
            <div id="paragraph">
            <br>
            <p>
                ![](./images/profile.png)
                <h1>we are engineers</h1>
                <p>we are young</p>
            </p>    
            </div>
            <div id="leftside">
                <h1>Working</h1>
                ![](./images/cabin.png)
            </div>
            <div id="middle1">
                <h1>Eating</h1>
                ![](./images/cake.png)
            </div>
            <div id="middle2">
                <h1>Playing</h1>
                ![](./images/game.png)
            </div>
            <div id="rightside">
                <h1>Sleeping</h1>
                ![](./images/circus.png)
            </div>
            <div id="footer1">
                <br>
                <a name="con">
                    <h1>let's learn with us
                    <br>
                    good good study,day day up!
                    </h1>
                </a>
            
            <div style="background-color: powderblue;width: 450px;height: 400px;float: left;margin-left: 80px"></div>
            <div style="background-color: orange;width: 400px;height: 400px;float: left;text-align: center;">
            ![](./images/user.png)
            <br>
            <br>
            <form action="MAILTO:support@shiyanlou.com" method="post" enctype="text/plain">
                <h3>Send email to shiynlou</h3>
                Your name:
                <br>
                <input type="text" name="name" value="yourname" size="20">
                <br>
                Your email:
                <br>
                <input type="text" name="mail" value="youremail" size="20">
                <br>
                What you wanna say:
                <br>
                <input type="text" name="comment" value="yourcomment" size="20">
                <br>
                <br>
                <input type="submit" value="send">
                <input type="reset" value="rewrite">
            </form> 
            </div>
            </div>
            <div id="footer2" align="center"></div>
        </div>
    </body>
</html>

css部分

#container{
    width:100%;
}
#header{
    width: 100%;
    height: 130px;
    text-align: center;
    background-color: #758181;
}
#header h1{
    color: aliceblue 
}
#header a{
    float: left;
    color: lightgray;                         
}
#paragraph{
    background-color: lightseagreen;
    height: 550px;
    text-align: center;
    font-size: 30px;
}
#paragraph h1{
    color: aliceblue;
}
#paragraph p{
    color: aliceblue;
}
#leftside{
    margin-left: 48px;
    height: 350px;
    width: 310px;
    float: left;
}
#leftside img{
    height: 260px;
    width: 300px;
}
#leftside h1{
    text-align: center;
    color: lightslategray;
}
#middle1{
    margin-left: 48px;
    height: 350px;
    width: 310px;
    float: left;
}
#middle1 img{
    height: 260px;
    width: 300px;
}
#middle1 h1{
    text-align: center;
    color: lightslategray;
}
#middle2{
    margin-left: 48px;
    height: 350px;
    width: 310px;
    float: left;
}
#middle2 img{
    height: 260px;
    width: 300px;
}
#middle2 h1{
    text-align: center;
    color: lightslategray;
}
#rightside{
    margin-left: 48px;
    height: 350px;
    width: 310px;
    float: left;
}
#rightside img{
    height: 260px;
    width: 300px;
}
#rightside h1{
    color: lightslategray;
    text-align: center;
}
#footer1{
    height: 600px;
    background-color: powderblue;
    clear: both;
}
#footer1 a{
    text-align: center;
    color: lightslategray;
}
#footer2{
    height: 100px;
    background-color: lightslategray;
    text-align: center;
    clear: both;
}
毕竟新手,做的还不够好,勿喷
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 问答题47 /72 常见浏览器兼容性问题与解决方案? 参考答案 (1)浏览器兼容问题一:不同浏览器的标签默认的外补...
    _Yfling阅读 14,680评论 1 92
  • 转载请声明 原文链接地址 关注公众号获取更多资讯 第一部分 HTML 第一章 职业规划和前景 职业方向规划定位...
    前端进阶之旅阅读 16,685评论 32 459
  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 175,254评论 25 709
  • 梦境 无尽地旋转 三角形 那么稳定 却要不停地蹬踏 似要挣脱 这牢笼 冲破束缚 待到天微凉 依旧 在更深处挣扎 无...
    祎言阅读 1,300评论 0 1
  • 《棋王》是当代作家阿城的一部短篇小说。小说被视作是新时期“寻根文学”的发韧之作。故事讲述了在特殊时代,知青“棋呆子...
    和氏璧好贵阅读 2,726评论 0 1