Python實戰(zhàn)總結(jié)(一)

這是我做的一個Html測試頁面:

頁面效果如下所示:

Paste_Image.png

html代碼如下所示

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
    <div class = "header">
        ![](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>Article</h2>
        <ul class="article">
            <li>
                <img src = "images/0001.jpg" width="100" height="90">
                <h3><a href="#">The blah</a></h3>
                <p>This is a dangerously delicious cake.</p>
            </li>
            <li>
                <img src = "images/0002.jpg"width="100" height="90">
                <h3><a href="#">The blah</a></h3>
                <p>It's always taco night somewhere!</p>
            </li>
            <li>
                <img src = "images/0003.jpg"width="100" height="90">
                <h3><a href="#">The blah</a></h3>
                <p>Omelette you in on a little secret </p>
            </li>
            <li>
                ![](images/0004.jpg)
                <h3><a href="#">The blah</a></h3>
                <p>It's a sandwich.  That's all we .</p>
            </li>
        </ul>
    </div>
    <div class = "footer">
        <p>@copy;   SouthWest University</p>
    </div>

</body>
</html>

這是另外一個html頁面

Paste_Image.png

html代碼如下所示

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="homework.css">
</head>
<body>
    <div class ="header">
        ![](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>
        <ul class = "photos">
            ![](images/0001.jpg)
            ![](images/0002.jpg)
            ![](images/0003.jpg)
        </ul>
        <p>
            stretching from Solta to Mljet, and this unique cycling trip captures the highlights with an ideal
            balance of activity, culture and relaxation. Experience the beautiful island of Korcula with its picturesque old town,
            the untouched beauty of Vis, and trendy Hvar with its Venetian architecture. In the company of a cycling guide,
            this stimulating journey explores towns and landscapes, many of which are on UNESCO's world heritage list.
            Aboard the comfortably appointed wooden motor yacht,
            there is ample time between cycles to swim in the azure waters and soak up the ambience of seaside towns.
        </p>
    </div>
    <div class = "footer">
        <p>@copyright southwest university</p>
    </div>
</body>
</html>
  • 通過如上兩個html頁面對常用的html標(biāo)簽進(jìn)行總結(jié)
    div標(biāo)簽:用于在文檔中設(shè)定一個塊區(qū)域 常用屬性:align:left center right
    li標(biāo)簽:標(biāo)簽表示的是一個列表項
    ? type:這個屬性只適用于無序列表,用于設(shè)定項目符號,默認(rèn)值為disc
    ? value:這個屬性只適用于有序列表,用于設(shè)定列表的項目數(shù)字
    ul標(biāo)簽:標(biāo)簽表示的是一個無序列表。type:規(guī)定列表的項目符號類型,可取值 disc,square,circle.默認(rèn)值為disc

問題總結(jié):li標(biāo)簽和ul標(biāo)簽的混合使用方法。

附:css代碼

body {
  padding: 0 0 0 0;
  background-color: #ffffff;
  background-image: url(images/bg3-dark.jpg);
  background-position: top left;
  background-repeat: no-repeat;
  background-size: cover;
  font-family: Helvetica, Arial, sans-serif;
}
.nav {
  padding-left: 0;
  margin: 5px 0 20px 0;
  text-align: center;
}
.nav li {
  display: inline;
  padding-right: 10px;
}
.nav li:last-child {
  padding-right: 0;
}
.header {
  padding: 10px 10px 10px 10px;

}

.header a {
  color: #ffffff;
}
.header img {
  display: block;
  margin: 0 auto 0 auto;
}
.header h1 {
  text-align: center;
}

.main-content {
  width: 500px;
  padding: 20px 20px 20px 20px;
  border: 1px solid #dddddd;
  border-radius:15px;
  margin: 30px auto 0 auto;
  background: #fdffff;
  -webkit-box-shadow: 0 0 22px 0 rgba(50, 50, 50, 1);
  -moz-box-shadow:    0 0 22px 0 rgba(50, 50, 50, 1);
  box-shadow:         0 0 22px 0 rgba(50, 50, 50, 1);

}
h1, h2, h3 {
  color: #37A5F0;
}
h1 {
  color: #ffffff;
  margin: 10px 0 15px 0;
  text-align: center;
}
h2 {
  margin: 10px 0 20px 0;
  text-align: center;
  font-size: 26px;
  font-weight: bold;
}
h3 {
  margin: 15px 0 15px 0;
  border-bottom: 1px solid #CCCCCC;
  padding-bottom: 3px;
  font-size: 18px;
  font-weight: bold;
}
ul {
  padding: 0 0 0 50px;
}
ul li {
  margin: 0 0 5px 0;
}
ol {
  padding: 0 0 0 50px;
}

p {
    color: #505050;
    font-size: 15px;
    padding-left: 10px;
    padding-right: 10px;
}
hr {
    border:none;
    border-top:1px solid gainsboro;
    height:0;
}

.main-content {
  width: 500px;
  padding: 20px 20px 20px 20px;
  border: 1px solid #dddddd;
  margin: 30px auto 0 auto;
  background: #ffffff url(images/crossword.png) top left repeat;
}
.main-content p {
 line-height: 26px;
}
.photos {
  list-style-type: none;
  padding: 0;
}
.photos li {
  display: inline;
  padding-left: 11px;
}
.featured-image {
  width: 500px;
  height: 195px;
  background: #ffffff url(images/featured-cake.png) top left no-repeat;
}
.featured-image h3 {
  margin: 0;
  background-color: #333333;
  color: #ffffff;
  padding: 5px 0 5px 15px;
  text-transform: uppercase;
}
.footer {
  margin-top: 20px;
}
.footer p {
  color: #aaaaaa;
  text-align: center;
  font-weight: bold;
  font-size: 12px;
  font-style: italic;
  text-transform: uppercase;
}

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

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

  • 轉(zhuǎn)載請聲明 原文鏈接地址 關(guān)注公眾號獲取更多資訊 第一部分 HTML 第一章 職業(yè)規(guī)劃和前景 職業(yè)方向規(guī)劃定位...
    前端進(jìn)階之旅閱讀 16,627評論 32 459
  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 134,991評論 19 139
  • 問答題47 /72 常見瀏覽器兼容性問題與解決方案? 參考答案 (1)瀏覽器兼容問題一:不同瀏覽器的標(biāo)簽?zāi)J(rèn)的外補(bǔ)...
    _Yfling閱讀 13,813評論 1 92
  • 三亞·亞龍灣,我心里最美麗的地方。 2007年1月的一天,他說,我要帶你去一個你一定會喜歡的地方。沒錯,就是亞龍灣...
    詩樺閱讀 3,255評論 2 13
  • 秋意正濃時,你說你會跟我見一面 寒寒嚴(yán)風(fēng)下,見到的你陽光俊朗 那感覺暖如春日 驅(qū)走的還有心頭的煩悶 臨走時你說下次...
    Vivi_Hedgehog閱讀 79評論 0 0