博客列表 >固定定位实现QQ客服效果-2019.4.27 11:05

固定定位实现QQ客服效果-2019.4.27 11:05

邓亮的博客
邓亮的博客原创
2019年04月27日 11:06:49529浏览

实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>QQ客服</title>
    <style>
        *{
            margin: 0px;
            padding: 0px;
        }
        body{
            height: 3000px;
        }
        .ads{
            position: fixed;
            right: 0px;
            top: 50%;
            margin-top: -100px;
        }
        .ads-ys1{
            width: 100px;
            height: 100px;
            background-color: #5647dc;
        }

        .ads-ys2{
            width: 100px;
            height: 100px;
            background-color: #dc1a94;
            margin-top: 2px;
        }
    </style>
</head>
<body>
<h1>腾讯网首页</h1>
<div class="ads">
    <div class="ads-ys1">
        <h2>qq客服1</h2>
    </div>
    <div class="ads-ys2">
        <h2>qq客服2</h2>
    </div>

</div>

</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

QQ截图20190427110717.png

声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议