Home  >  Article  >  Web Front-end  >  CSS control list

CSS control list

无忌哥哥
无忌哥哥Original
2018-06-28 17:41:341761browse

Attribute Description

list-style Abbreviation attribute. Used to set all properties for a list in one declaration

list-style-image Sets the image as the list item flag.

list-style-position sets the position of the list item mark in the list.

list-style-type Set the type of list item flag.

<!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>

The above is the detailed content of CSS control list. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:CSS background settingsNext article:CSS background settings