阅读背景:

[学习css系列]纯css实现移入移出效果

来源:互联网 

使用css的:hover伪类选择器来实现移入移出的效果。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .b{
            width : 300px;
            height : 300px;
            border : 1px solid blue;
        }
        .c {
            display:none;
            width : 100px;
            height : 100px;
            margin : 100px auto;
            border : 1px solid red;
        }
        .b:hover .c{
            display:block;
        }
    </style>
</head>
<body>
    <div class="b">
        <div class="c"></div>
    </div>
</body>
</html><!DOCTYPE ht



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: