• 微信、微博、qq图标服务实现


    实现原理:变化前的图标和变化后的图标在一张图片上,用这张图片作为背景,通过定义背景的位置来实现显示哪个图标,其中还带着滑动的动画效果。

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style type="text/css">
        .wh{width: 17px;height: 13px;float:left;margin-right:5px;}
        .icon1{background: url(img/logo-sprite.png) no-repeat -1px -1px;transition: background 1s; }
        .icon2{background: url(img/logo-sprite.png) no-repeat -29px -1px;transition: background 1s;}
        .icon3{background: url(img/logo-sprite.png) no-repeat -59px -1px;transition: background 1s;}
        .icon1:hover{background: url(img/logo-sprite.png) no-repeat -1px -18px;}
        .icon2:hover{background: url(img/logo-sprite.png) no-repeat -29px -18px;}
        .icon3:hover{background: url(img/logo-sprite.png) no-repeat -59px -18px;}
        </style>
    </head>
    <body>
        <div class="contact">
            <div class="icon1 wh"></div>
            <div class="icon2 wh"></div>
            <div class="icon3 wh"></div>
        </div>
    </body>
    </html>
  • 相关阅读:
    动手动脑(类与对象作业再次提交)
    论团队(类与对象邮箱作业再次提交)
    流于形式的沟通
    加密
    string类中一些方法的使用
    StringEquals的用法
    命令行接收数字求和
    计算机思维
    SpringBoot之Callable处理异步请求
    MySQL8.0 zip版本 安装
  • 原文地址:https://www.cnblogs.com/liuyanxia/p/5265925.html
Copyright © 2020-2023  润新知