如何爲 Web 添加動畫效果。css
https://github.com/cssanimation/css-animation-101html
https://github.com/H-Wakanda/css-animation-101-cnvue
https://cssanimation.rocks/git
https://www.cnblogs.com/xgqfrms/p/10897934.htmlgithub
https://www.cnblogs.com/sspeng/p/10338599.htmlweb
<h1 class="postTitle"> <a id="cb_post_title_url" class="postTitle2" href="https://www.cnblogs.com/xgqfrms/p/10897934.html"> shit mint-ui & vue mobile ui components </a> </h1>
#topics .postTitle { background-image: linear-gradient(to right, red, orange, yellow, green, yellow, orange, red, orange, yellow, green, yellow, orange, red); -webkit-text-fill-color: transparent; -webkit-background-clip: text; -webkit-background-size: 200% 100%; -webkit-animation: word-color-animation 5s infinite linear; } #topics .postTitle { padding: 0 0 0 10px; font-size: 150%; line-height: 2em; } #topics .postTitle { font-size: 110%; font-weight: bold; border-bottom: 1px solid #999; line-height: 1.5em; padding-left: 5px; } media="only screen and (max-width: 767px)" .postTitle { padding: 0 10px 10px 10px; } .postTitle { font-size: 14px; font-weight: bold; padding: 0 100px 10px 20px; border-bottom: 1px solid #e0e0e0; line-height: 1.5em; clear: both; border-left: 5px solid #1fa6e6; } h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; } * { word-break: normal !important; } * { margin: 0; padding: 0; }
word-color-animationide
@keyframes word-color-animation { 0% { background-position: 0 0; } 100% { background-position: -100% 0; } }
*{ word-break:normal !important; } .cnblogs_code { -webkit-border-radius: 10px; -moz-border-radius: 10px; -ms-border-radius: 10px; -o-border-radius: 10px; border-radius: 10px; } .postBody li, .postCon li { margin-bottom: 0; } #cnblogs_post_body{ font-size:14px; } #blogTitle h1 { font-size: 200%; } .blogStats { visibility: visible; margin-right: 20px; } #navList, #navList li { height: 60px; } #navList a { height: 60px; border-radius: 5px; margin: 0 10px 0 0; font: 16px/60px "微軟雅黑"; text-decoration: none !important; border-radius: 5px; } #navList a:hover{ background: #34d9e0; color: #333; text-shadow: none; } #home { margin: 0 auto; width: 1100px; } #mainContent { width: 800px; } #topics { padding: 2em; } #topics .postTitle { padding: 0 0 0 10px; font-size: 150%; line-height: 2em; } #sideBar { margin-left: 800px; padding: 0 2em 0 5px; } #sideBarMain { margin-top: 65px; } #topics .postTitle { background-image: linear-gradient(to right, red, orange, yellow, green, yellow, orange, red, orange, yellow, green, yellow, orange, red); -webkit-text-fill-color: transparent; -webkit-background-clip: text; -webkit-background-size: 200% 100%; -webkit-animation: word-color-animation 5s infinite linear; } @keyframes word-color-animation { 0% { background-position: 0 0; } 100% { background-position: -100% 0; } }