css剪裁GIF背景图片动画特效

所属分类:其他-动画效果

 12685  100  查看评论 (0)
分享到微信朋友圈
X
css剪裁GIF背景图片动画特效 ie兼容12

css剪裁GIF背景图片动画

这是一款css剪裁GIF背景图片动画特效。该特效利用css的background-clip技术,将gif图片剪裁为文字效果,非常炫酷。

使用方法

 HTML结构

<div class= "wrapper">
  <div class= "text" data-text= "2020">2020</div>
<div>

CSS样式

.wrapper{
  background: #252854;
  width: 100%;
  height:500px;
  border-radius: 5px;
  position: relative;  
}
.text{
  flex: 0 0 100%;
  font-size: 14rem;
  font-weight: 900;
  color: #00000000;
  text-align: center;
  font-family: 'Lato', sans-serif;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-bottom: 1px solid #d4d7ff;
  border-top: 1px solid #d4d7ff;
  background: url(./img/source.gif);
  background-clip: text;
  -webkit-background-clip: text;
}
   
 .text:after{
   content: attr(data-text);
   -webkit-text-stroke: 1.5px #d4d7ff;
   position: absolute;
   left: 50%;
   top: 50%;
   transform: translate(-50%, -49%);
   background: url(./img/source.gif);
   background-clip: text;
   -webkit-background-clip: text;
   background-size: 43%;
 
}
相关插件-动画效果

支持小数,从零开始的翻牌器

jQuery数字滚动,支持小数,从零开始的翻牌器,
  动画效果
 19703  242

jQuery点赞+1动画效果

一款基于jQuery+CSS3实现的点赞+1动画效果,非常实用
  动画效果
 53548  521

css3实现鲨鱼游动(酷)

css3实现鲨鱼游动,效果非常酷哦。
  动画效果
 37545  414

html5 canvas粒子星空

html5 canvas鼠标跟随粒子星空动画
  动画效果
 75138  738

讨论这个项目(0)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复