我已经做了一个CSS动画,将文本动画给它一个闪耀的效果。该效果目前仅适用于水平。我想知道是否有一种方法可以改变动画的方向,使其看起来像一个现实的对角线闪耀?有没有办法使CSS动画对角工作?
这里是我当前的代码:
h1 {
font-family: 'BebasRegular', sans-serif;
font-size: 150px;
padding-bottom: 100px;
padding-top: 50px;
background: #E9AB17 -webkit-gradient(linear, left top, right top, from(#e8a917), to(#f4b011), color-stop(0.5, #fff)) 0 0 no-repeat;
-webkit-background-size: 155px;
color: rgba(255, 255, 255, 0.1);
-webkit-background-clip: text;
-webkit-animation-name: shine;
-webkit-animation-duration: 5s;
-webkit-animation-iteration-count: infinite;
}
@-webkit-keyframes shine
{
0%
{
background-position: top left;
}
28%,100%
{
background-position: top right;
}
}
感谢您的帮助我熟悉的,真是又感激。 – fabregilkas 2013-05-14 23:38:09