2 Star 13 Fork 3

lesscode.work/Grace Animation Library

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.hbuilderx
GAL
pages
about
demo
buttons
other
text
clip-text.vue
number-show.vue
text-fade.vue
api-animate.vue
css-animate.vue
css-animate2.vue
index
static
.DS_Store
.gitignore
App.vue
LICENSE
main.js
manifest.json
pages.json
readme.md
克隆/下载
clip-text.vue 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
lesscode.work 提交于 4年前 . 20210412
<template>
<view class="gal-padding"
style="padding:30rpx;">
<view>
<text class="gal-block-text gal-h4 gal-color-gray">文本背景动画</text>
</view>
<view class="gal-margin-top-large">
<view>
<text class="demo staticBg">静态渐变文本</text>
</view>
</view>
<view class="gal-margin-top-large">
<view>
<text class="demo animateBG">动画背景文本</text>
</view>
</view>
</view>
</template>
<script>
export default {
}
</script>
<style>
.demo{
text-align:center;
line-height:100rpx;
font-size:88rpx;
display:block;
font-weight:bold;
}
.staticBg{
background-image:linear-gradient(to bottom, #39B55A , #8DC63E);
background-clip:text;
color: transparent;
}
.animateBG{
background-image:linear-gradient(to bottom, #39B55A , #8DC63E);
background-clip:text;
color: transparent;
background-image: url("https://img1.baidu.com/it/u=3496595466,3334896335&fm=26&fmt=auto&gp=0.jpg");
background-repeat:no-repeat;
background-size:600rpx auto;
animation: animateBG 5s infinite alternate;
}
@keyframes animateBG{
0%{background-position-x:-20%;}
100%{background-position-x:115%;}
}
</style>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/less_code/grace-animation-library.git
git@gitee.com:less_code/grace-animation-library.git
less_code
grace-animation-library
Grace Animation Library
master

搜索帮助