CSS控制列表

來源:互聯網
上載者:User
屬性描述

list-style簡寫屬性。用於把所有用於列表的屬性設定於一個聲明中

list-style-image將圖象設定為清單項目標誌。

list-style-position設定列表中清單項目標誌的位置。

list-style-type設定清單項目標誌的類型。

<!DOCTYPE html><html><head>    <meta charset="UTF-8">    <title>3.CSS控制列表</title>    <style>        .list {            width: 350px;            height:500px;            /*background-color: lightskyblue;*/            border: 1px solid #696969;            border-radius: 2%;            color: #363636;            background-color: #fefefe;        }        .list h2 {            padding-left: 20px;        }        .item { list-style-type:decimal;list-style-position: inside;    padding: 10px;        }        .item li {            /*background-color: lightgreen;*/        }        .item li a {            text-decoration: none;        }        .item li a:hover {            text-decoration: underline;            color:#6CF;            font-size: 1.05em;        }    </style></head><body><div class="list">    <h2>頭條公告</h2>    <ul class="item">        <li><a href="">物理學家史蒂芬·霍金去世,享年76歲</a></li>        <li><a href="">物理學家史蒂芬·霍金去世,享年76歲</a></li>        <li><a href="">物理學家史蒂芬·霍金去世,享年76歲</a></li>        <li><a href="">物理學家史蒂芬·霍金去世,享年76歲</a></li>        <li><a href="">物理學家史蒂芬·霍金去世,享年76歲</a></li>        <li><a href="">物理學家史蒂芬·霍金去世,享年76歲</a></li>        <li><a href="">物理學家史蒂芬·霍金去世,享年76歲</a></li>        <li><a href="">物理學家史蒂芬·霍金去世,享年76歲</a></li>        <li><a href="">物理學家史蒂芬·霍金去世,享年76歲</a></li>    </ul></div></body></html>
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.