发送按钮的酷炫动画

发送按钮的酷炫动画

添加时间:2021-02-25 10:46:25
站长推荐丨赞助论坛,可获取海量资源终身免费下载权限奥!
举报 举报
收藏
预览
附件 附件
  • 模板类型模板类型:图标导航
  • 模板颜色模板颜色:初级
  • 下载积分下载积分:28 米粒
  • 下载权限下载权限:

    赞助会员

一款发送按钮的酷炫动画,点击按钮会有一个图标环绕的变形动画,由一个纸飞机变形成一个对号,之后又自动恢复到初始状态,动画效果还是挺不错的哦,喜欢的童鞋请收下吧。
发送按钮的酷炫动画
分类:导航菜单 > 图标导航 难易:初级

页面的head部分,远程调用图标字体库ionicons,并设置好页面元素的样式,代码如下:

<link rel='stylesheet prefetch' href='https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css'>
<style type="text/css">
html {
  box-sizing: border-box;
  font-size: 62.5%;
  overflow: hidden;
}

* {
  padding: 0;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: inherit;
}
*::after, *::before {
  box-sizing: inherit;
}

body .send-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes icon-animation {
  0% {
    transform: rotate(0deg) scale(1);
  }
  33% {
    transform: rotate(-120deg) scale(4);
  }
  66% {
    transform: rotate(-240deg) scale(4);
  }
  100% {
    transform: rotate(-360deg) scale(1);
  }
}
@keyframes input-shadow {
  0% {
    box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.14), 0 1px 7px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -1px rgba(0, 0, 0, 0.2);
  }
  40% {
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: none;
  }
  70% {
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
  }
  100% {
    box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.14), 0 1px 7px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -1px rgba(0, 0, 0, 0.2);
  }
}
.icon-wrapper-animation {
  animation: icon-animation 1.5s linear;
  transition: color 0.6s ease;
  color: #66bb6a;
}

.clicked {
  transform: translate(-50%, calc(-50% + 1px)) !important;
  transition: transform 0.15s ease;
  animation: input-shadow 0.15s ease;
  box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.14), 0 1px 7px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -1px rgba(0, 0, 0, 0.2);
}
.clicked > .text {
  transform: translateY(1px);
  transition: transform 0.15s ease-out;
}

body .send-button {
  background-color: #d81b60;
  width: 250px;
  height: 45px;
  border-radius: 3px;
  box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s;
  text-shadow: 1px 2px 1px rgba(77, 9, 36, 0.6);
}
body .send-button .text {
  position: absolute;
  left: 10px;
  font-size: 22px;
  font-size: 2.2rem;
  letter-spacing: 1px;
  line-height: 45px;
  font-family: 'Microsoft YaHei','Lantinghei SC','Open Sans',Arial,'Hiragino Sans GB','STHeiti','WenQuanYi Micro Hei','SimSun',sans-serif;
  font-weight: 500;
  color: #fff;
  text-transform: uppercase;
}
body .send-button .icon-wrapper {
  position: absolute;
  right: -65px;
  bottom: -10px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  line-height: 45px;
  color: #fff;
}
body .send-button .icon-wrapper [class*="icon-"] {
  position: absolute;
  left: 100px;
  bottom: 10px;
  transition: color 0.6s ease;
}
body .send-button .icon-wrapper .icon-1 {
  transform: rotate(15deg);
  font-size: 23px;
  font-size: 2.3rem;
  opacity: 1;
}
body .send-button .icon-wrapper .icon-2 {
  opacity: 0;
  font-size: 25px;
  font-size: 2.5rem;
}
</style>

页面的body部分,多个span标签放入一个div容器里,代码如下:

<div class="send-button">
 <span class="text">发送</span>
  <span class="icon-wrapper">
  	<span class="icon-1 ion-paper-airplane"></span>
		<span class="icon-2 ion-checkmark"></span>
  </span>
</div>

页面的底部,远程调用jQuery库,并引入本地JS文件,代码如下:

<script src='https://code.jquery.com/jquery-2.2.4.min.js'></script>
<script type="text/javascript" src="js/index.js"></script>
相关内容推荐
资源求助发帖
查看更多发帖

*

回帖描述:

*

链接类型:

*

下载链接:

密码:
发帖规则:回帖内容为会员之间的私信,普通网友无法查看。
免责声明:回帖中提供的链接内容仅供会员之间学习参考使用,获取内容后请在法律法规范围内使用。回帖提供的内容应符合法律法规要求,不得违反法律法律的要求。
站点权责:回帖内容如违反法律法规,站点有权封停账号使用权利。对用户举报的内容,站点有责任及时删除违规内容。
热点内容推荐
标题:发送按钮的酷炫动画

*

描述:
平均回复时间:3-10分钟
规则介绍:悬赏寻求论坛网友分享资源,站点对分享内容的准确性,合法性,版权等没有足够的监管能力。如果您发现资源不正确,无法使用,不符合法律法律等情况,您可以直接举报资源。站长将尽快核实您的举报,并根据情况,采取封号,退换米粒等处理。

*

回帖描述:

*

链接类型:

*

阅读权限:

*

下载链接:

密码:
发帖规则:回帖内容为会员之间的私信,普通网友无法查看。
免责声明:回帖中提供的链接内容仅供会员之间学习参考使用,获取内容后请在法律法规范围内使用。回帖提供的内容应符合法律法规要求,不得违反法律法律的要求。
站点权责:回帖内容如违反法律法规,站点有权封停账号使用权利。对用户举报的内容,站点有责任及时删除违规内容。
  • 背景波浪
  • 背景波浪
  • 波浪
  • 波浪
客服
在线咨询
周一 至 周日 9:00 ~ 22:00
QQ:1326974360
微信:juyoubuluo6688
客服热线
18205485173
工作日 9:00 ~ 18:00
微信扫码咨询
客户服务
欢迎咨询服务
咨询量较多时,请耐心等待
社群

关注公众号

获取更多资讯

扫码进群(QQ)

与更多大牛交流沟通

0.098352s