{"id":2438,"date":"2023-11-14T15:10:41","date_gmt":"2023-11-14T03:57:34","guid":{"rendered":""},"modified":"2023-11-14T11:57:34","modified_gmt":"2023-11-14T03:57:34","slug":"CSS \u52a8\u753b","status":"publish","type":"post","link":"https:\/\/bianchenghao6.com\/2438.html","title":{"rendered":"CSS \u52a8\u753b"},"content":{"rendered":"
\n
\u52a8\u753b\u540d\u79f0<\/span>
\n \u52a8\u753b\u7684\u6301\u7eed\u65f6\u95f4<\/span> <\/p>\n CSS\u52a8\u753b\u5c5e\u6027<\/h2>\n
\n\n
\n \u5c5e\u6027<\/td>\n \u8bf4\u660e<\/td>\n<\/tr>\n \n @keyframes <\/td>\n \u5b83\u7528\u4e8e\u6307\u5b9a\u52a8\u753b\u3002<\/td>\n<\/tr>\n \n animation<\/td>\n \u8fd9\u662f\u4e00\u4e2a\u7b80\u5199\u5c5e\u6027\uff0c\u7528\u4e8e\u8bbe\u7f6e\u9664animation-play-state\u548canimation-fill-mode\u5c5e\u6027\u4e4b\u5916\u7684\u6240\u6709\u5c5e\u6027\u3002<\/td>\n<\/tr>\n \n animation-delay<\/td>\n \u5b83\u6307\u5b9a\u52a8\u753b\u4f55\u65f6\u5f00\u59cb\u3002<\/td>\n<\/tr>\n \n animation-direction<\/td>\n \u5b83\u6307\u5b9a\u52a8\u753b\u662f\u5426\u5e94\u5728\u5907\u7528\u5468\u671f\u4e2d\u4fdd\u7559\u64ad\u653e\u3002<\/td>\n<\/tr>\n \n animation-duration<\/td>\n \u5b83\u6307\u5b9a\u52a8\u753b\u5b8c\u6210\u4e00\u4e2a\u5468\u671f\u6240\u82b1\u8d39\u7684\u65f6\u95f4\u3002<\/td>\n<\/tr>\n \n animation-fill-mode<\/td>\n \u5b83\u6307\u5b9a\u5143\u7d20\u7684\u9759\u6001\u6837\u5f0f\u3002 \uff08\u5f53\u52a8\u753b\u4e0d\u64ad\u653e\u65f6\uff09<\/td>\n<\/tr>\n \n animation-iteration-count <\/td>\n \u5b83\u6307\u5b9a\u52a8\u753b\u64ad\u653e\u7684\u6b21\u6570\u3002<\/td>\n<\/tr>\n \n animation-play-state<\/td>\n \u5b83\u6307\u5b9a\u52a8\u753b\u662f\u6b63\u5728\u8fd0\u884c\u8fd8\u662f\u6682\u505c\u3002<\/td>\n<\/tr>\n \n animation-name<\/td>\n \u5b83\u6307\u5b9a@keyframes\u52a8\u753b\u7684\u540d\u79f0\u3002<\/td>\n<\/tr>\n \n animation-timing-function<\/td>\n \u5b83\u6307\u5b9a\u52a8\u753b\u7684\u901f\u5ea6\u66f2\u7ebf\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n CSS\u52a8\u753b\u793a\u4f8b\uff1a\u66f4\u6539\u80cc\u666f\u989c\u8272<\/h2>\n
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background: red;
-webkit-animation: myfirst 6s; \/* Chrome, Safari, Opera *\/
animation: myfirst 5s;
}
\/* Chrome, Safari, Opera *\/
@-webkit-keyframes myfirst {
from {background: red;}
to {background: green;}
}
\/* Standard syntax *\/
@keyframes myfirst {
from {background: red;}
to {background: green;}
}
<\/style>
<\/head>
<body>
<p><b>Note:<\/b> The IE 9 and earlier versions don't support CSS3 animation property. <\/p>
<div><\/div>
<\/body>
<\/html>
<\/span><\/code><\/pre>\n<\/p><\/div>\n <\/p>\n
CSS\u52a8\u753b\u793a\u4f8b\uff1a\u79fb\u52a8\u77e9\u5f62<\/h2>\n
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background: red;
position: relative;
-webkit-animation: myfirst 5s; \/* Chrome, Safari, Opera *\/
animation: myfirst 5s;
}
\/* Chrome, Safari, Opera *\/
@-webkit-keyframes myfirst {
0% {background:red; left:0px; top:0px;}
25% {background:yellow; left:300px; top:0px;}
50% {background:blue; left:200px; top:300px;}
75% {background:green; left:0px; top:200px;}
100% {background:red; left:0px; top:0px;}
}
\/* Standard syntax *\/
@keyframes myfirst {
0% {background:red; left:0px; top:0px;}
25% {background:yellow; left:300px; top:0px;}
50% {background:blue; left:300px; top:200px;}
75% {background:green; left:0px; top:200px;}
100% {background:red; left:0px; top:0px;}
}
<\/style>
<\/head>
<body>
<p><b>Note:<\/b> The Internet Explorer 9 and its earlier versions don't support this example.<\/p>
<div><\/div>
<\/body>
<\/html>
<\/span><\/code><\/pre>\n<\/p><\/div>\n
\n <\/body>
\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"zh-cn","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[175],"tags":[],"class_list":["post-2438","post","type-post","status-publish","format-standard","hentry","category-css-jc"],"_links":{"self":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts\/2438"}],"collection":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/comments?post=2438"}],"version-history":[{"count":0,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts\/2438\/revisions"}],"wp:attachment":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/media?parent=2438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/categories?post=2438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/tags?post=2438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}