2023.12.1 第二十章

主要学习了:

1.超链接伪类介绍:a:link,a:visited,a:hover,a:active

2.深入了解超链接的伪类,进行自定义

3.深入了解了hover,可用于任何元素被访问时

4.鼠标样式和自定义鼠标样式

代码:

<!DOCTYPE html><html>

    <head>

        <meta charset="utf-8" />

        <title>/</title>

        <style type="text/css">

           /* a{text-decoration: none;}  

            a:link{color: red;}

            a:visited{color: purple;}

            a:hover{color: yellow;}

            a:active{color: blue;}*/

            a{

                color: red;

                text-decoration: none;

            }

            a:hover{

                color: blue;

                text-decoration: underline;

            }

            div{

                width: 100px;

                height: 30px;

                line-height: 30px;

                text-align: center;

                color: white;

                background-color: lightskyblue;

                font-size: 14px;

            }

            #div_default{cursor: default;}

            #div_pointer{cursor: url(../素材/绱犳潗/img/huawei.cur),pointer;}

            div:hover{

                background-color: hotpink;

            }

            img:hover{

                border: 2px solid red;

            }

        </style>

    </head>

    <body>

        <a href="https://www.baidu.com/" target="_blank">百度搜索</a>

        <div>百度搜索</div>

        <img src="../素材/绱犳潗/img/4.jpg">

        <div id="div_default">鼠标默认样式</div>

        <div id="div_pointer">鼠标手状样式</div>

    </body>

</html>

效果:

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值