css span提示框 练习(不能用div)

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="style/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="js.js"></script>
    <style type="text/css">

    </style>
    <script type="text/javascript">

    </script>
</head>
<body>
<div>
    <h1>上下文增加内容,方便测试位移</h1>
    <p>增加内容方便测试位移:鼠标<a href="#">悬浮<span>鼠标悬浮提示鼠标悬浮提示鼠标悬浮提示鼠标悬浮提示鼠标悬浮提示</span></a>提示练习测试</p>
    <h2>上下文增加内容,方便测试位移</h2>
</div>
</body>
</html>

 

span{
    display: none;
}
a{
    text-decoration: none;
    font-weight: bold;
    color: red;
    position: relative;
}
a:hover span{
    border: 1px solid black;
    display: block;
    position: absolute;
    background: #ffffff;
    width:120px;
    height: 120px;
    margin:4px 0 0 10px;
    padding:8px;
}

css span提示框 练习(不能用div),布布扣,bubuko.com

css span提示框 练习(不能用div)

上一篇:C调用Matlab线性规划DLL二次开发封装DLL


下一篇:《ASP.NET SignalR系列》第一课 认识SignalR