HTML+CSS实现(排行榜+棋盘+表格+图片商品列表)

导读:本篇文章讲解 HTML+CSS实现(排行榜+棋盘+表格+图片商品列表),希望对大家有帮助,欢迎收藏,转发!站点地址:www.bmabk.com

目录

1. 排行榜

2. 棋盘

3. 表格

4. 图片商品列表


1. 排行榜

HTML+CSS实现(排行榜+棋盘+表格+图片商品列表) 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>排行榜</title>
</head>
<body>
    <style>
        #rank-list td {
            font-style: 1.1em;
            padding-top: 3px;
            padding-bottom: 3px;
        }
        a {
            text-decoration: none;
            color: blue;
        }
        .num > span {
            color: darkgrey;
        }
        .boil {
            background-color: red;
            color: white;
            border-radius: 5px;
            font-style: 0.85em;
            padding: 1px 2px 1px 2px;
        }
        .hot {
            background-color: coral;
            color: white;
            border-radius: 5px;
            font-style: 0.85em;
            padding: 1px 2px 1px 2px;
        }
        .new{
            background-color: orange;
            color: white;
            border-radius: 5px;
            font-style: 0.85em;
            padding: 1px 2px 1px 2px;
        }

    </style>
    <div class="container">
        <table id="rank-list">
            <tr>
                <td><span><img src="上升.png" width="20px"></span></td>
                <td><a href="#">中国空间站第三棒全国开跑</a></td>
            </tr>
            <tr>
                <td class="num"><span style="color: red;">1</span></td>
                <td><a href="#">#2022高考作文来了# <span class="boil">沸</span></a></td>
            </tr>
            <tr>
                <td class="num"><span style="color: coral;">2</span></td>
                <td><a href="#">深圳回应“50辆宾利堵车位”纠纷 <span class="hot">热</span></a></td>
            </tr>
            <tr>
                <td class="num"><span style="color:orange;">3</span></td>
                <td><a href="#">回头看高考青春永不老 <span class="hot">热</span></a></td>
            </tr>
            <tr>
                <td class="num"><span >4</span></td>
                <td><a href="#">不出意外今年高考又出现了这些意外</a></td>
            </tr>
            <tr>
                <td class="num"><span>5</span></td>
                <td><a href="#">考生忘带准考证家长又送错考场  <span class="new">新</span></a></td>
            </tr>
            <tr>
                <td class="num"><span>6</span></td>
                <td><a href="#">苹果用3分钟正式宣战新行业</a></td>
            </tr>
            <tr>
                <td class="num"><span>7</span></td>
                <td><a href="#"><span>回头看高考青春永不老 </span></a></td>
            </tr>
            
        </table>
    </div>
</body>
</html>

 


2. 棋盘

HTML+CSS实现(排行榜+棋盘+表格+图片商品列表)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>棋盘</title>
</head>
<body>
    <style>
        .container {
            width: 600px;
            height: 600px;
            border: 5px solid black;
            margin: auto;
            display: flex;
        }
        .black {
            background-color: black;
            width: 200px;
            height: 200px;
        }
        .white {
            background-color: white;
            width: 200px;
            height: 200px;
        }
    </style>

    <div class="container">
        <div>
            <div class="black"></div>
            <div class="white"></div>
            <div class="black"></div>
        </div>
        <div>
            <div class="white"></div>
            <div class="black"></div>
            <div class="white"></div>
        </div>
        <div>
            <div class="black"></div>
            <div class="white"></div>
            <div class="black"></div>
        </div>
    </div>
</body>
</html>

 

3. 表格

HTML+CSS实现(排行榜+棋盘+表格+图片商品列表)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>表格</title>
</head>
<body>
    <style>
        table,td {
            text-align: center;
        }
        .one {
            color: red;
            text-decoration: underline;
        }
        .two {
            color: green;
            text-decoration: line-through;
        }
        .three {
            color: blue;
            font-weight: 900;
        }
    </style>
    <table width="400px" border="1px" cellspacing="0">
        <tr class="one">
            <td>1</td>
            <td>2</td>
            <td>3</td>
        </tr>
        <tr class="two">
            <td>4</td>
            <td>5</td>
            <td>6</td>
        </tr>
        <tr class="three">
            <td>7</td>
            <td>8</td>
            <td>9</td>
        </tr>
    </table>
</body>
</html>

 

4. 图片商品列表

HTML+CSS实现(排行榜+棋盘+表格+图片商品列表)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品图片列表</title>
</head>
<body>
    <style>
        .row>img {
            width: 15%;
        }
    </style>

    <div class="row">
        <img src="11.jpg">
        <img src="22.jpg">
        <img src="33.jpg">
        <img src="44.jpg">
        <img src="55.jpg">
    </div>
    <div class="row">
        <img src="11.jpg">
        <img src="22.jpg">
        <img src="33.jpg">
        <img src="44.jpg">
        <img src="55.jpg">
    </div>
</body>
</html>

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/91212.html

(0)
小半的头像小半

相关推荐

极客之音——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!