百度云盘  传送门  密码:7eh5

弹出式按钮效果

<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>jQuery实现Tooltip弹出样式的分享按钮DEMO演示</title> <link rel="stylesheet" href="css/style.css"> </head> <body><script src="/demos/googlegg.js"></script>
<li class="share">
<a href="#" class="tool-handle footer-nav-link button">Gary</a>
<ul class="tooltip">
<li><a href="#" >Facebook</a></li>
<li><a href="#" >Twitter</a></li>
<li><a href="#" >Email</a></li>
<span class="close-button close">&times</span>
</ul>
</li>
<script src='js/jquery.min.js'></script> <script src="js/index.js"></script> </body>
</html>

index.html

.share .close, .close {
width: 20px;
height: 20px;
z-index: 3;
color: white;
border-radius: 50%;
background-color: #00243d;
cursor: pointer;
font-size: .9em;
transition: 200ms opacity 400ms;
} .share {
position: relative;
text-align: left;
}
.share .tooltip {
position: absolute;
top: -195px;
left: 0;
padding: 10px;
box-shadow: 0 8px 13px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(0, 0, 0, 0.06);
background-color: #017ED5;
border-bottom: 2px solid #00243d;
border-radius: 3px;
opacity: 0;
visibility: hidden;
transition: all 200ms ease-in-out, visibility 0ms;
transform-origin: bottom center;
} .share .tooltip:before, .share .tooltip:after {
content: "";
display: block;
width: 0;
height: 0;
position: absolute;
left: 30px;
bottom: -28px;
z-index: 3;
border: solid 15px transparent;
border-top-color: #017ED5;
right: auto;
} .share .tooltip:after {
bottom: -31px;
z-index: 2;
border-top-color: #00243d;
}
.show.share .tooltip {
display: block;
visibility: visible;
transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
animation: wobble 700ms;
opacity: 1;
}
.share .close {
text-align: center;
position: absolute;
top: -10px;
left: -10px;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
} .share {
list-style: none;
display: inline-block;
}
.share.show .footer-nav-link {
background-color: rgba(180, 181, 183, 0.5);
}
.share .tooltip {
padding: 0;
padding-bottom: 15px;
padding-top: 10px;
}
.share li {
list-style: none;
display: block;
width: 100%;
}
.share li a {
display: block;
width: 100%;
padding: 25px 25px;
font-size: .75em;
box-sizing: border-box;
}
.share li a:hover {
background-color: rgba(180, 181, 183, 0.5);
} a.button {
display: inline-block;
text-decoration: none;
letter-spacing: .1em;
text-transform: capitalize;
color: white;
background-color: #b4b5b7;
padding: 15px 20px;
border-radius: 2px;
font-weigth: 700;
} .close {
position: absolute;
top: -10px;
left: -10px;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
} .share {
list-style: none;
display: inline-block;
}
.share.show .footer-nav-link {
background-color: rgba(0, 36, 61, 0.5);
}
.share li {
list-style: none;
display: block;
width: 100%;
}
.share li a {
display: block;
position: relative;
width: 100%;
padding: 15px 25px;
padding-left: 50px;
}
.share li a:hover {
background-color: rgba(180, 181, 183, 0.5);
} a {
display: inline-block;
text-decoration: none;
letter-spacing: .1em;
text-transform: capitalize;
color: white;
} a.button {
display: inline-block;
text-decoration: none;
letter-spacing: .13em;
text-transform: capitalize;
color: white;
transition: all 200ms;
background-color: rgba(68, 70, 76, 0.3);
padding: 10px 13px;
border-radius: 2px;
} body {
text-align: center;
padding-top: 230px;
background: #c9b23d;
} @keyframes wobble {
0% {
transform: scale(0) rotate(-54deg) translatey(40px);
}
45% {
transform: scale(1.1) rotate(20deg) translatey(0px);
}
60% {
transform: scale(1) rotate(-15deg) translatey(0px);
}
77% {
transform: scale(1) rotate(10deg) translatey(0px);
}
100% {
transform: translatey(0);
}
} .share a:after {
display: block;
position: absolute;
left: 25px;
top: 50%;
transform: translateY(-50%) translateX(-50%);
width: 7px;
height: 15px;
background-size: 100%;
content: '';
background-repeat: no-repeat;
} .share a.twitter-share:after {
width: 15px;
height: 10px;
} .share a.email-share:after {
width: 12px;
height: 9px;
}

style.css

实现过程

css

@keyframes:创建动画

@keyframes wobble {
0% {
transform: scale(0) rotate(-54deg) translatey(40px);
}
45% {
transform: scale(1.1) rotate(20deg) translatey(0px);
}
60% {
transform: scale(1) rotate(-15deg) translatey(0px);
}
77% {
transform: scale(1) rotate(10deg) translatey(0px);
}
100% {
transform: translatey(0);
}
}
创建动画是通过逐步改变从一个CSS样式设定到另一个。

在动画过程中,您可以更改CSS样式的设定多次。

指定的变化时发生时使用%,或关键字"from"和"to",这是和0%到100%相同。

0%是开头动画,100%是当动画完成。

为了获得最佳的浏览器支持,您应该始终定义为0%和100%的选择器。

@keyframes规则

transform:属性向元素应用 2D 或 3D 转换。该属性允许我们对元素进行旋转、缩放、移动或倾斜  参数属性:传送门

  scale():定义缩放比例

  rotate(angle) 定义 2D 旋转,在参数中规定角度

  translateY(y) 定义转换,只是用 Y 轴的值

 

按钮样式

a.button {
display: inline-block;
text-decoration: none;
letter-spacing: .1em;
text-transform: capitalize;
color: white;
background-color: #b4b5b7;
padding: 15px 20px;
border-radius: 2px;
font-weigth: 700;
}

text-decoration:属性规定添加到文本的修饰

  none 默认。定义标准的文本
  underline 定义文本下的一条线
  overline 定义文本上的一条线
  line-through 定义穿过文本下的一条线
  blink 定义闪烁的文本

none 默认 定义标准的文本

letter-spacing :属性增加或减少字符间的空白(字符间距)

text-transform属性,可以轻易地实现英文字母大小写转换

  capitalize; 单词首个字母大写

  uppercase; 全部大写

  lowercase; 全部小写

font-weight:设置三个段落的字体的粗细

分享框样式

.share .tooltip {
position: absolute;
top: -195px;
left: 0;
padding: 10px;
box-shadow: 0 8px 13px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(0, 0, 0, 0.06);
background-color: #017ED5;
border-bottom: 2px solid #00243d;
border-radius: 3px;
opacity: 0;
visibility: hidden;
transition: all 200ms ease-in-out, visibility 0ms;
transform-origin: bottom center;
}

box-shadow: h-shadow v-shadow blur spread color inset

  h-shadow 必需的。水平阴影的位置。允许负值

  v-shadow 必需的。垂直阴影的位置。允许负值

  blur 可选。模糊距离

  spread 可选。阴影的大小

  color 可选。阴影的颜色

  inset 可选。从外层的阴影(开始时)改变阴影内侧阴影

border-bottom:设置下边框的样式

  border-bottom-width
  border-bottom-style 
  border-bottom-color

opacity:设置 div 元素的不透明级别

visibility:属性规定元素是否可见

transition :属性是一个简写属性,用于设置四个过渡属性

  transition-property 规定设置过渡效果的 CSS 属性的名称。
  transition-duration 规定完成过渡效果需要多少秒或毫秒。
  transition-timing-function 规定速度效果的速度曲线。
  transition-delay 定义过渡效果何时开始。

transform-origin :属性允许您改变被转换元素的位置

  2D 转换元素能够改变元素 x 和 y 轴。3D 转换元素还能改变其 Z 轴。

DOM

 

    <li class="share">
<a href="#" class="tool-handle footer-nav-link button">Gary</a>
<ul class="tooltip">
<li><a href="#" >Facebook</a></li>
<li><a href="#" >Twitter</a></li>
<li><a href="#" >Email</a></li>
<span class="close-button close">&times</span>
</ul>
</li>

JS框架_(JQuery.js)Tooltip弹出式按钮插件的更多相关文章

  1. JS框架_(JQuery.js)绚丽的3D星空动画

    百度云盘: 传送门 密码:8ft8 绚丽的3D星空动画效果(纯CSS) (3D星空动画可以用作网页背景,Gary为文本文字) <!doctype html> <html lang=& ...

  2. JS框架_(JQuery.js)圆形多选菜单选项

    百度云盘 传送门 密码:zb1c 圆形多选菜单选项效果: <!DOCTYPE html> <html lang="en" > <head> &l ...

  3. JS框架_(JQuery.js)夜晚天空满天星星闪烁动画

    百度云盘 传送门 密码:xftr 满天星星闪烁动画效果: (可用星空动画来作为页面背景,白色文字改为文章或者其他的O(∩_∩)O) <!doctype html> <html> ...

  4. JS框架_(JQuery.js)网页文字评论弹幕

    百度云盘 传送门 密码:3azl jQuery网页右下角文字评论弹幕效果 <!DOCTYPE html> <html> <head> <title>jQ ...

  5. JS框架_(JQuery.js)文章全屏动画切换

    百度云盘 传送门 密码:anap 文章全屏动画切换效果 <!doctype html> <html lang="zh"> <head> < ...

  6. JS框架_(JQuery.js)动画效果鼠标跟随

    百度云盘 传送门 密码 :4n9u 火狐浏览器上纯CSS_动画效果鼠标跟随效果: (作者:lily_lcj 传送门) <!DOCTYPE html PUBLIC "-//W3C//DT ...

  7. JS框架_(JQuery.js)点赞按钮动画

    百度云盘 传送门 密码: 0ihy 点赞按钮动画效果: (点击一次随机生成一颗小爱心,作为点赞动画~) <!doctype html> <html lang="en&quo ...

  8. JS框架_(JQuery.js)图片相册掀开切换效果

    百度云盘 传送门 密码:y0dk 图片掀开切换效果: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN&quo ...

  9. JS框架_(JQuery.js)上传进度条

    百度云盘 传送门 密码: 1pou 纯CSS上传进度条效果: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN ...

随机推荐

  1. java基础:强引用、弱引用、软引用和虚引用 (转)

    出处文章: Java基础篇 - 强引用.弱引用.软引用和虚引用 谈谈Java对象的强引用,软引用,弱引用,虚引用分别是什么 整体结构 java提供了4中引用类型,在垃圾回收的时候,都有自己的各自特点. ...

  2. Https接口调用工具类

    ClientUtil.java import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org. ...

  3. Dubbo消费方服务调用过程源码分析

    参考:dubbo消费方服务调用过程源码分析dubbo基于spring的构建分析Dubbo概述--调用过程dubbo 请求调用过程分析dubbo集群容错机制代码分析1dubbo集群容错策略的代码分析2d ...

  4. 101、Service 之间如何通信?(Swarm08)

    参考https://www.cnblogs.com/CloudMan6/p/7967419.html   微服务架构的应用由若干 service 构成.比如有运行 httpd 的 web 前端,有提供 ...

  5. 11 Mysql之配置双主热备+keeepalived.md

    准备 1. 双主 master1 192.168.199.49 master2 192.168.199.50 VIP 192.168.199.52 //虚拟IP 2.环境 master:nginx + ...

  6. 12 Scrapy框架的日志等级和请求传参

    一.Scrapy的日志等级 - 在使用scrapy crawl spiderFileName运行程序时,在终端里打印输出的就是scrapy的日志信息. - 日志信息的种类: ERROR : 一般错误 ...

  7. 把两个object对象合并成一个对象 属性名称相同的变为后面对象的值

    object.assign(from,obj)------object.assign(目标对象,被合并的对象)

  8. javascript中的数据渲染与提取

    table数据 <div id="tableDiv" style="overflow-x: scroll"> <table class=&qu ...

  9. Linux 配置:Xmanager连接Linux图形界面

    想要在远程终端使用用图形界面来操作和控制Linux服务器,就在windows下像使用MSTSC一样.linux通过XDMCP来提供这种支持,我们只要用一个终端仿真软件如:xmanager就可以实现,但 ...

  10. tensorflow源码分析

    前言: 一般来说,如果安装tensorflow主要目的是为了调试些小程序的话,只要下载相应的包,然后,直接使用pip install tensorflow即可. 但有时我们需要将Tensorflow的 ...