美文网首页
Python实战计划学习第二天:做一个网页

Python实战计划学习第二天:做一个网页

作者: 缘小异 | 来源:发表于2016-05-12 22:47 被阅读61次

    今天是学习Python的第二天,昨天看过教程后,信心满满,今天就马上做了后面的练习!

    最终成果是这样的:

    Paste_Image.png

    下面是代码:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>the blah</title>
    <link rel="stylesheet" type="text/css" href="homework.css">
    </head>
    <body>
      <div class="header">
        <img src="images/blah.png">
        <ul class="nav">
            <li><a href="#">Home</a></li>
            <li><a href="#">Site</a></li>
            <li><a href="#">Other</a></li>
        </ul>
    </div>
    <div class="main-content">
        <h2>The Beach</h2>
        <hr />
        <ul class="photos">
            <li>
                <img src="images/0001.jpg"  width="150" height="150">
            </li>
            <li>
                <img src="images/0003.jpg"  width="150" height="150">
            </li>
            <li>
                <img src="images/0004.jpg"  width="150" height="150">
            </li>
        </ul>
        <p>
            For other uses, see Beach (disambiguation).
    "Sand beach" redirects here. For other uses, see Sand Beach (disambiguation).
    
    A sand and shingle beach
    A beach is a landform along the coast of an ocean or sea. It usually consists
     of loose particles, which are often composed of rock, such as sand, gravel, shingle,
     pebbles, or cobblestones. The particles comprising a beach are occasionally biological
     in origin, such as mollusc shells or coralline algae.
    
    Some beaches have man-made infrastructure, such as lifeguard posts, changing rooms,
     and showers. They may also have hospitality venues (such as resorts, camps, hotels,
     and restaurants) nearby. Wild beaches, also known as undeveloped or undiscovered beaches,
     are not developed in this manner. Wild
     beaches can be valued for their untouched
     beauty and preserved nature.
    
    Beaches typically occur in areas along the coast where wave or current action 
    deposits and reworks sediments.
        </p>
    </div>
    <div class="footer">
        <P>©Beach</P>
    </div>
    </body>
    </html>
    

    总结

    • css样式写好之后,我们就可以直接套用样式了,非常方便。
    • 只有<body>里面的内容才会显示在网页上面。
    • 不同区域的内容用div标签来分开。
    • <hr />可以画出一条横线。
    • css样式文件和图片文件夹最好摆放在同一个文件夹,否则路径必须写仔细。

    相关文章

      网友评论

          本文标题:Python实战计划学习第二天:做一个网页

          本文链接:https://www.haomeiwen.com/subject/wytprttx.html