CSS练习

1.导航栏

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style>
    ul{
        list-style-type:none
    }
    li{
        display: inline-block;
        width:20%;
        background:grey;
        padding-top: 10px;
        padding-bottom: 10px;
        text-align: center;
        font-size: large;
        text-decoration: none;
    }
    li:hover{
        background: black;
        color: white;
        text-decoration: none;
    }
    a:hover{
        color: snow;
        text-decoration: none;
    }
</style>
<body>
<ul style="list-style:none">
    <li ><a href="http://www.w3school.com.cn/html/index.asp">HTML</a></li>
    <li ><a href="http://www.w3school.com.cn/css3/index.asp">CSS</a></li>
    <li ><a href="http://www.w3school.com.cn/js/index.asp">JS</a></li>
    <li ><a href="https://blog.csdn.net/forever_wen">Python</a></li>

</ul>

</body>
</html>

在这里插入图片描述2.分页练习

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        ul {
            list-style-type: none;

        }

        li {
            text-decoration: none;
            display: inline-block;
            width: 10%;
            padding-top: 5px;
            padding-bottom: 5px;
            background: snow;
            color: #333333;

            text-align: center;
            font-size: large;
            text-transform: capitalize;

        }


        li:hover {
            background: green;
            color: snow;
        }

        a:hover {

            color: snow;

        }
        .active{
            background:  gray;
        }

        #pageintor{
            width: 80%;
            margin: 0 auto;
        }

    </style>
</head>
<body>


<div id="pageintor">
<ul>
    <li><a href="#">上一页</a></li>
    <li  class="active"><a   href="#">1</a></li>
    <li><a href="#">2</a></li>
    <li><a href="#">3</a></li>
    <li><a href="#">4</a></li>
    <li><a href="#">...</a></li>
    <li><a href="#">28</a></li>
    <li><a href="#">下一页</a></li>


</ul>
    </div>
</body>
</html>

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值