Created
March 14, 2020 19:11
-
-
Save norilog4/d8dbeb00ce2b3794216786692a606b8c to your computer and use it in GitHub Desktop.
動く蛍光ペン風マーカーの実装CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.marker-animation.active{ | |
background-position: -100% .5em; | |
} | |
.marker-animation { | |
background-image: -webkit-linear-gradient(left, transparent 50%, rgb(255,250,153) 50%); | |
background-image: -moz-linear-gradient(left, transparent 50%, rgb(255,250,153) 50%); | |
background-image: -ms-linear-gradient(left, transparent 50%, rgb(255,250,153) 50%); | |
background-image: -o-linear-gradient(left, transparent 50%, rgb(255,250,153) 50%); | |
background-image: linear-gradient(left, transparent 50%, rgb(255,250,153) 50%); | |
background-repeat: repeat-x; | |
background-size: 200% .8em; | |
background-position: 0 .5em; | |
transition: all 2s ease; | |
font-weight: bold; | |
} | |
.m-blue { | |
background-image: -webkit-linear-gradient(left, transparent 50%, rgba(107, 182, 255, 0.24) 50%); | |
background-image: -moz-linear-gradient(left, transparent 50%, rgba(107, 182, 255, 0.24) 50%); | |
background-image: -ms-linear-gradient(left, transparent 50%, rgba(107, 182, 255, 0.24) 50%); | |
background-image: -o-linear-gradient(left, transparent 50%, rgba(107, 182, 255, 0.24) 50%); | |
background-image: linear-gradient(left, transparent 50%, rgba(107, 182, 255, 0.24) 50%); | |
background-repeat: repeat-x; | |
background-size: 200% .8em; | |
background-position: 0 .5em; | |
transition: all 2s ease; | |
font-weight: bold; | |
} | |
.m-green { | |
background-image: -webkit-linear-gradient(left, transparent 50%, rgba(151, 232, 154, 0.69) 50%); | |
background-image: -moz-linear-gradient(left, transparent 50%, rgba(151, 232, 154, 0.69) 50%); | |
background-image: -ms-linear-gradient(left, transparent 50%, rgba(151, 232, 154, 0.69) 50%); | |
background-image: -o-linear-gradient(left, transparent 50%, rgba(151, 232, 154, 0.69) 50%); | |
background-image: linear-gradient(left, transparent 50%, rgba(151, 232, 154, 0.69) 50%); | |
background-repeat: repeat-x; | |
background-size: 200% .8em; | |
background-position: 0 .5em; | |
transition: all 2s ease; | |
font-weight: bold; | |
} | |
.m-red { | |
background-image: -webkit-linear-gradient(left, transparent 50%, rgba(255, 88, 88, 0.2) 50%); | |
background-image: -moz-linear-gradient(left, transparent 50%, rgba(255, 88, 88, 0.2) 50%); | |
background-image: -ms-linear-gradient(left, transparent 50%, rgba(255, 88, 88, 0.2) 50%); | |
background-image: -o-linear-gradient(left, transparent 50%, rgba(255, 88, 88, 0.2) 50%); | |
background-image: linear-gradient(left, transparent 50%, rgba(255, 88, 88, 0.2) 50%); | |
background-repeat: repeat-x; | |
background-size: 200% .8em; | |
background-position: 0 .5em; | |
transition: all 2s ease; | |
font-weight: bold; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
⬇️このコードの使い方を紹介しているブログ記事はこちら
https://noripon.blog/2020/03/15/how-to-make-css-design-moving-highlighter/