【发布时间】:2020-07-07 08:25:23
【问题描述】:
我已经在网上爬了大约 2 个小时,试图找到解决方案。所以我很抱歉,我的起始代码并没有太大帮助。
我尝试过使用background-clip、multiple.js、fill,就是无法得到我想要的效果。
事实上,我目前甚至无法复制:https://stackoverflow.com/a/56916981 使用 Font Awesome 5 和讨厌的 SVG。
这是我目前所在的位置:
body{
font-size:150px;
}
svg {
background: -webkit-linear-gradient(225deg, rgb(251, 175, 21), rgb(251, 21, 242),
rgb(21, 198, 251)) 0% 0% / 300% 300%;
-webkit-text-fill-color: transparent;
animation: 2s ease 0s infinite normal none running fontgradient;
-webkit-animation: fontgradient 2s ease infinite;
-moz-animation: fontgradient 2s ease infinite;
animation: fontgradient 2s ease infinite;
}
@-webkit-keyframes fontgradient {
0%{background-position:0% 92%}
50%{background-position:100% 9%}
100%{background-position:0% 92%}
}
@-moz-keyframes fontgradient {
0%{background-position:0% 92%}
50%{background-position:100% 9%}
100%{background-position:0% 92%}
}
@keyframes fontgradient {
0%{background-position:0% 92%}
50%{background-position:100% 9%}
100%{background-position:0% 92%}
}
<script src="https://use.fontawesome.com/releases/v5.0.1/js/all.js"></script>
<i class="fab fa-stack-overflow"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-facebook-f"></i>
【问题讨论】:
-
一个背景横跨所有图标。对吗?
-
没错@ZohirSalak
标签: html css font-awesome linear-gradients font-awesome-5