Fade In and Out

Adds fade out effect when the page is unloaded

< 脚本Fade In and Out的反馈

评价:好评 - 脚本运行良好

§
发表于:2014-03-31
编辑于:2014-03-31

As mentioned in other threads, great script!

I cannot rate it unless I create a new thread so ... well ... here I am.
Love it!

LouCypher作者
§
发表于:2014-04-01
编辑于:2014-04-03

Thanks @mikedl

It's originally from this thread
http://forum.userstyles.org/discussion/31373/fade-in-effect-on-web-pages/p1
You had cameo appearance there :D

You can modify the script and change it, for example, like this

GM_addStyle("@keyframes slideInRight {\
  from {\
    transform: translateX(2000px);\
  }\
  to {\
    transform: translateX(0);\
  }\
}\
@keyframes slideOutLeft {\
  from {\
    transform: translateX(0);\
  }\
  to {\
    transform: translateX(-2000px);\
  }\
}\
html {\
  animation-name: slideInRight;\
  animation-duration: 1s;\
}\
.kthxbye {\
  animation-name: slideOutLeft;\
  animation-fill-mode: forwards;\
}")

addEventListener("beforeunload", function() {
  document.documentElement.classList.add("kthxbye");
})

More cool CSS animations
http://daneden.github.io/animate.css/

§
发表于:2014-04-02

LouCypher, LOL! That's way too cool! Nice!

发表回复

登录(不可用)以发表回复。

长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元