ps:最近写的很多博客都是在以前在项目里写过的,之所以现在写出来,最大的目的就是希望自己以后用到的时候比较容易找,而且现在再写一遍,有助于加深印象!

很简单的效果,说先实现方式:

1.图标来自 阿里巴巴矢量图标库 没用过的可以试下,各式各样的图标,非常好用

2.初始每个分享框左右两侧都有一个隐藏的图标,和隐藏的文字

3.js操作鼠标移入时,图标和文字移动,将隐藏的显示,显示的隐藏

4.css3的transition

先看下效果吧:

1这是鼠标未移入时

2.鼠标移入(动画效果演示不了。。。

代码如下:

css:

 @font-face {
font-family: 'iconfont'; /* project id 219179 */
src: url('http://at.alicdn.com/t/font_dh783vq4jh7rdx6r.eot');
src: url('http://at.alicdn.com/t/font_dh783vq4jh7rdx6r.eot?#iefix') format('embedded-opentype'),
url('http://at.alicdn.com/t/font_dh783vq4jh7rdx6r.woff') format('woff'),
url('http://at.alicdn.com/t/font_dh783vq4jh7rdx6r.ttf') format('truetype'),
url('http://at.alicdn.com/t/font_dh783vq4jh7rdx6r.svg#iconfont') format('svg');
}
.iconfont {
font-family:"iconfont" !important;
font-size:16px;
font-style:normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.servicesBox {
width: 1000px;
height: 270px;
margin: auto;
clear: both;
line-height: 18px;
color: #;
font-size: 12px;
}
.servicesBox .serBox {
cursor: pointer;
border: 1px solid #fff;
display: inline;
width: 100px;
height: 135px;
float: left;
overflow: hidden;
background-color: #f7f7f7;
position: relative;
}
.servicesBox .serBoxOn {
font-family: "微软雅黑";
opacity:;
width: 100px;
height: 135px;
background: #f48080;
position: absolute;
left: 0px;
top: 0px;
z-index: ;
transition:all linear .5s;
}
.servicesBox .serBox .pic1 {
width: 100px;
height: 100px;
text-align: center;
position: absolute;
top: 43px;
z-index: ;
transition:all linear .25s;
left: 0px;
}
.servicesBox .serBox .pic2 {
width: 100px;
height: 100px;
text-align: center;
position: absolute;
top: 43px;
left: -100px;
z-index: ;
transition:all linear .25s;
}
.servicesBox .serBox .pic2 i{
color:#fff;
}
.servicesBox .serBox .txt2 {
width: 100px;
height: 30px;
color: #fff;
position: absolute;
top: 97px;
left:100px;
z-index: ;
transition:all linear .25s;
}
.servicesBox .serBox .txt1 {
width: 100px;
height: 30px;
color: #;
position: absolute;
top: 97px;
left: 0px;
z-index: ;
transition:all linear .25s;
}
.servicesBox .serBox .txt1 .tit {
color: #;
line-height: 30px;
}
.servicesBox .serBox span.tit {
font-size: 16px;
display: block;
text-align: center;
} .servicesBox .serBox .txt2 .tit{
color:#fff;
line-height: 30px;
font-weight:bold;
}
.servicesBox .serBox p {
padding: 10px;
text-align: center;
}
.serBox i{
font-size:75px;
}
.serBox:hover .serBoxOn{
opacity: ;
}

html

<div class="servicesBox">
<div class="serBox"> <div class="serBoxOn"></div> <div class="pic1" > <i class="iconfont"></i> </div> <div class="pic2"> <i class="iconfont"></i> </div> <div class="txt1"> <span class="tit">QQ</span></div> <div class="txt2"><span class="tit">QQ</span></div> </div>
<div class="serBox"> <div class="serBoxOn"></div> <div class="pic1" > <i class="iconfont"></i> </div> <div class="pic2" > <i class="iconfont"></i> </div> <div class="txt1" > <span class="tit">微博</span></div> <div class="txt2" ><span class="tit">微博</span></div> </div>
<div class="serBox"> <div class="serBoxOn"></div> <div class="pic1" > <i class="iconfont"></i> </div> <div class="pic2" > <i class="iconfont"></i> </div> <div class="txt1" > <span class="tit">微信</span></div> <div class="txt2" ><span class="tit">微信</span></div> </div>
</div>

js:

 $(".serBox").mouseover(function(){
$(this).children(".pic1").css("left","100px")
$(this).children(".pic2").css("left","")
$(this).children(".txt1").css("left","-100px")
$(this).children(".txt2").css("left","")
})
$(".serBox").mouseout(function(){
$(this).children(".pic1").css("left","");
$(this).children(".pic2").css("left","100px")
$(this).children(".txt1").css("left","")
$(this).children(".txt2").css("left","-100px")
})

分享按钮(QQ,微信,微博等)移入动画效果的更多相关文章

  1. Oauth2.0 QQ&微信&微博实现第三方登陆

    一.写在前面 目前对于大多数的App或Web网站都支持有第三方登陆这个功能,用户可使用 QQ/ 微信/ 微博 帐号快速登录你的网站,降低注册门槛,为你的网站带来海量新用户.最近在新项目上刚好用到了,在 ...

  2. 访问量分类统计(QQ,微信,微博,网页,网站APP,其他)

    刚准备敲键盘,突然想起今天已经星期五了,有点小兴奋,一周又这么愉快的结束,又可以休息了,等等..我好像是来写Java博客的,怎么变成了写日记,好吧,言归正传. 不知道大家有没有遇到过这样的需求:统计一 ...

  3. qq 微信 微博 第三方分享

    <html> <head> <meta charset="utf-8"> <meta name="viewport" ...

  4. 【Android UI设计与开发】第03期:引导界面(三)仿微信引导界面以及动画效果

    基于前两篇比较简单的实例做铺垫之后,这一篇我们来实现一个稍微复杂一点的引导界面的效果,当然也只是稍微复杂了一点,对于会的人来说当然还是so easy!正所谓会者不难,难者不会,大概说的就是这个意思了吧 ...

  5. Android仿QQ窗口的抖动的动画效果

    就是仿照QQ窗口的抖动效果,在项目的res下创建anim文件夹,再创建两个xml文件:cycle.xml  . myanim.xml   cycle.xml  :   <?xml version ...

  6. 分享-QQ/微信/微博(环境搭建)

    QQ环境搭建

  7. Python 第三方登录 实现QQ 微信 微博 登录

    本人写的AgentLogin,能快速返回QQ.微信.微博第三方用户名信息,主要用于快速登录 用 pip命令安装 pip install AgentLogin 用法 : 导入这个包 from Agent ...

  8. TP QQ 微信 微博登录

    use Org\Util\QQconnect; use Org\Util\Wechatauth; use Org\Util\SaeTOAuthV2; use Org\Util\SaeTClientV2 ...

  9. 微信小程序的动画效果

    前言 由于公司计划有变,所以从H5页面改成去小程序写.所以在着手开发小程序.本人也不是什么前端高手,只是一名写后端偶尔写写前端的渣渣.请前端大神们勿喷. 一.什么是微信小程序? 小程序在我的理解中只是 ...

随机推荐

  1. failed parsing overlays.

    clearn + rebuild + 重新运行: 删掉模拟器进程 + 重新运行:

  2. 爬虫系列 一次采集.NET WebForm网站的坎坷历程

    今天接到一个活,需要统计人员的工号信息,由于种种原因不能直接连数据库 [无奈].[无奈].[无奈].采取迂回方案,写个工具自动登录网站,采集用户信息. 这也不是第一次采集ASP.NET网站,以前采集的 ...

  3. [ACdream 1215 Get Out!]判断点在封闭图形内, SPFA判负环

    大致题意:在二维平面上,给一些圆形岛屿的坐标和半径,以及圆形船的位置和半径,问能否划到无穷远的地方去 思路:考虑任意两点,如果a和b之间船不能通过,则连一条边,则问题转化为判断点是否在多边形中.先进行 ...

  4. Web_php_unserialize-攻防世界XCTF

    0x00 简介 记录一下,重点是记录一下那篇正则文章. 0x01 题目代码 <?php class Demo { private $file = 'index.php'; public func ...

  5. Codeforces 1105D(Kilani and the Game,双队列bfs)

    AC代码: #include<bits/stdc++.h> #define ll long long #define endl '\n' #define mem(a,b) memset(a ...

  6. Oracle细粒度审计

    场景 管理信息化应用,想审计某张表的数据是否做了删除.Oracle中专门有自带的函数.可以满足这个需求 1.查询审计日志的语句 select timestamp, db_user, os_user, ...

  7. 案例(一) 利用机器算法RFM模型做用户价值分析

      一.案例背景 在产品迭代过程中,通常需要根据用户的属性进行归类,也就是通过分析数据,对用户进行归类,以便于在推送及转化过程中获得更大的收益. 本案例是基于某互联网公司的实际用户购票数据为研究对象, ...

  8. JS数组的常用方法

    arr.join(str) 把arr使用str拼接成字符串 str拼接符 返回:String arr.reverse() 翻转数组 翻转操作的是原数组 返回:Array数组 arr.concat(ar ...

  9. DRF认证组件

    1.DRF认证组件之视图注册用法(自定义简单使用) settings.py配置 INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.a ...

  10. mysql设置文档快捷写

    select distinct column_name,column_comment,column_type from information_schema.columns where table_n ...