模板:Hovers/hover.css

来自理想城计划
/* 滤镜 */
.hovers-blur,
.hovers-blur-reverse,
.hovers-brightness,
.hovers-brightness-reverse,
.hovers-contrast,
.hovers-contrast-reverse,
.hovers-grayscale,
.hovers-grayscale-reverse,
.hovers-invert,
.hovers-invert-reverse,
.hovers-saturate,
.hovers-saturate-reverse,
.hovers-sepia,
.hovers-sepia-reverse,
.hovers-hue-rotate,
.hovers-hue-rotate-reverse {
  transition-duration: 0.75s;
}
 
.hovers-blur:hover,
.hovers-blur.active,
.hovers-brightness:hover,
.hovers-brightness.active,
.hovers-contrast:hover,
.hovers-contrast.active,
.hovers-grayscale:hover,
.hovers-grayscale.active,
.hovers-invert:hover,
.hovers-invert.active,
.hovers-saturate:hover,
.hovers-saturate.active,
.hovers-sepia:hover,
.hovers-sepia.active,
.hovers-hue-rotate:hover,
.hovers-hue-rotate.active {
  filter: initial;
}
 
.hovers-blur {
  filter: blur(5px);
}
 
.hovers-blur-reverse:hover,
.hovers-blur-reverse.active {
  filter: blur(5px);
}
 
.hovers-brightness {
  filter: brightness(50%);
}
 
.hovers-brightness-reverse:hover,
.hovers-brightness-reverse.active {
  filter: brightness(50%);
}
 
.hovers-contrast {
  filter: contrast(50%);
}
 
.hovers-contrast-reverse:hover,
.hovers-contrast-reverse.active {
  filter: contrast(50%);
}
 
.hovers-grayscale {
  filter: grayscale(100%);
}
 
.hovers-grayscale-reverse:hover, 
.hovers-grayscale-reverse.active {
  filter: grayscale(100%);
}
 
.hovers-invert {
  filter: invert(100%);
}
 
.hovers-invert-reverse:hover,
.hovers-invert-reverse.active {
  filter: invert(100%);
}
 
.hovers-saturate {
  filter: saturate(200%);
}
 
.hovers-saturate-reverse:hover,
.hovers-saturate-reverse.active {
  filter: saturate(200%);
}
 
.hovers-sepia {
  filter: sepia(100%);
}
 
.hovers-sepia-reverse:hover,
.hovers-sepia-reverse.acitve {
  filter: sepia(100%);
}
 
.hovers-hue-rotate {
  filter: hue-rotate(180deg);
}
 
.hovers-hue-rotate-reverse:hover,
.hovers-hue-rotate-reverse.active {
  filter: hue-rotate(180deg);
}
 
/* 背景滑动 */
.hovers-sweep-to-right,
.hovers-sweep-to-left,
.hovers-sweep-to-bottom,
.hovers-sweep-to-top,
.hovers-radial-out,
.hovers-radial-in {
  position: relative;
  transition-duration: 0.3s;
  transition-timing-function: ease-out;
  overflow: hidden;
}
 
.hovers-sweep-to-right:before,
.hovers-sweep-to-left:before,
.hovers-sweep-to-bottom:before,
.hovers-sweep-to-top:before,
.hovers-radial-out:before,
.hovers-radial-in:before {
  content: '';
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  transform: scaleX(0);
  transition: inherit;
}
.hovers-sweep-to-bottom:before,
.hovers-sweep-to-top:before {
  transform: scaleY(0);
}
.hovers-radial-out:before,
.hovers-radial-in:before {
  border-radius: 50%;
  transform: scale(0);
}
.hovers-radial-in:before {
  transform: scale(2);
}
 
.hovers-sweep-to-right:before {
  transform-origin: 0 50%;
}
.hovers-sweep-to-left:before {
  transform-origin: 100% 50%;
}
.hovers-sweep-to-bottom:before {
  transform-origin: 50% 0;
}
.hovers-sweep-to-top:before {
  transform-origin: 50% 100%;
}
.hovers-radial-out:hover:before,
.hovers-radial-out.active:before {
  transform: scale(2);
}
.hovers-radial-in:hover:before,
.hovers-radial-in.active:before {
  transform: scale(0);
}
 
.hovers-sweep-to-right .hovers-content.center,
.hovers-sweep-to-left .hovers-content.center,
.hovers-sweep-to-bottom .hovers-content.center,
.hovers-sweep-to-top .hovers-content.center,
.hovers-radial-out .hovers-content.center,
.hovers-radial-in .hovers-content.center {
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-all;
}
 
.hovers-sweep-to-right:hover:before,
.hovers-sweep-to-left:hover:before,
.hovers-sweep-to-bottom:hover:before,
.hovers-sweep-to-top:hover:before,
.hovers-sweep-to-right.active:before,
.hovers-sweep-to-left:hover:before,
.hovers-sweep-to-bottom:hover:before,
.hovers-sweep-to-top:hover:before {
  transform: scaleX(1);
}
 
.hovers-sweep-to-right .hovers-content,
.hovers-sweep-to-left .hovers-content,
.hovers-sweep-to-bottom .hovers-content,
.hovers-sweep-to-top .hovers-content,
.hovers-radial-out .hovers-content,
.hovers-radial-in .hovers-content {
  width: 100%;
  height: 100%;
  position: absolute;
  transition-property: all;
  transition-duration: inherit;
  top: 0;
  left: 0;
  z-index: 11;
}
 
.hovers-sweep-to-right .hovers-content {
  left: initial;
  right: 100%;
}
.hovers-sweep-to-right:hover .hovers-content,
.hovers-sweep-to-right.active .hovers-content {
  right: 0;
}
 
.hovers-sweep-to-left .hovers-content {
  left: 100%;
}
.hovers-sweep-to-left:hover .hovers-content,
.hovers-sweep-to-left.active .hovers-content {
  left: 0;
}
 
.hovers-sweep-to-bottom .hovers-content {
  top: initial;
  bottom: 100%;
}
.hovers-sweep-to-bottom:hover .hovers-content,
.hovers-sweep-to-bottom.active .hovers-content {
  bottom: 0;
}
 
.hovers-sweep-to-top .hovers-content {
  top: 100%;
}
.hovers-sweep-to-top:hover .hovers-content,
.hovers-sweep-to-top.active .hovers-content {
  top: 0;
}
 
.hovers-radial-out .hovers-content,
.hovers-radial-in:hover .hovers-content,
.hovers-radial-in.active .hovers-content {
  opacity: 0;
}
 
.hovers-radial-in .hovers-content,
.hovers-radial-out:hover .hovers-content,
.hovers-radial-out.active .hovers-content {
  opacity: 1;
}