小编And*_*son的帖子

用css自动闪耀效果

我试图做这个闪耀效果自动操作(没有:悬停),每5秒.

http://jsfiddle.net/AntonTrollback/nqQc7/

.icon:after {
  content: "";
  position: absolute;
  top: -110%;
  left: -210%;
  width: 200%;
  height: 200%;
  opacity: 0;
  transform: rotate(30deg);
  background: rgba(255, 255, 255, 0.13);
  background: linear-gradient(
    to right, 
    rgba(255, 255, 255, 0.13) 0%,
    rgba(255, 255, 255, 0.13) 77%,
    rgba(255, 255, 255, 0.5) 92%,
    rgba(255, 255, 255, 0.0) 100%
  );
}

.icon:hover:after {
  opacity: 1;
  top: -30%;
  left: -30%;
  transition-property: left, top, opacity;
  transition-duration: 0.7s, 0.7s, 0.15s;
  transition-timing-function: ease;
}
Run Code Online (Sandbox Code Playgroud)

html css jquery animation effects

7
推荐指数
1
解决办法
2万
查看次数

标签 统计

animation ×1

css ×1

effects ×1

html ×1

jquery ×1