Python實(shí)戰(zhàn)計(jì)劃學(xué)習(xí)第二天:做一個(gè)網(wǎng)頁(yè)

今天是學(xué)習(xí)Python的第二天,昨天看過(guò)教程后,信心滿滿,今天就馬上做了后面的練習(xí)!

最終成果是這樣的:

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>

總結(jié)

  • css樣式寫(xiě)好之后,我們就可以直接套用樣式了,非常方便。
  • 只有<body>里面的內(nèi)容才會(huì)顯示在網(wǎng)頁(yè)上面。
  • 不同區(qū)域的內(nèi)容用div標(biāo)簽來(lái)分開(kāi)。
  • <hr />可以畫(huà)出一條橫線。
  • css樣式文件和圖片文件夾最好擺放在同一個(gè)文件夾,否則路徑必須寫(xiě)仔細(xì)。
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

推薦閱讀更多精彩內(nèi)容

  • 問(wèn)答題47 /72 常見(jiàn)瀏覽器兼容性問(wèn)題與解決方案? 參考答案 (1)瀏覽器兼容問(wèn)題一:不同瀏覽器的標(biāo)簽?zāi)J(rèn)的外補(bǔ)...
    _Yfling閱讀 13,796評(píng)論 1 92
  • <a name='html'>HTML</a> Doctype作用?標(biāo)準(zhǔn)模式與兼容模式各有什么區(qū)別? (1)、<...
    clark124閱讀 3,549評(píng)論 1 19
  • 預(yù)定了篁嶺景區(qū)兩天的景觀房,因?yàn)樾∶绨l(fā)燒,意外地非常值,哪里也沒(méi)去,基本就在景區(qū)泡了近兩天,景區(qū)圖上標(biāo)注出的點(diǎn)都看...
    Rainie牙牙閱讀 279評(píng)論 1 0
  • 六月末降下了一場(chǎng)驟雨 所以七月的時(shí)候 行人的腳步都顯得很匆急 ...
    秋釀的魚(yú)閱讀 201評(píng)論 0 0
  • 按住shift+方向鍵可以調(diào)整控件大小,按住ctrl+鍵盤(pán)方向鍵可以移動(dòng)控件
    因思道客閱讀 310評(píng)論 0 0