{"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 <\/head>
\n <\/p>\n

\n

CSS \u52a8\u753b<\/h1>\n<\/p><\/div>\n
\n CSS\u52a8\u753b\u5c5e\u6027<\/strong>\u7528\u4e8e
\n \u5728\u7f51\u9875\u4e0a\u521b\u5efa\u52a8\u753b<\/em>\u3002\u5b83\u53ef\u4ee5\u66ff\u4ee3Flash\u548cJavaScript\u521b\u5efa\u7684\u52a8\u753b\u3002\n <\/div>\n
\n <\/div>\n

CSS3 @keyframes\u89c4\u5219<\/h2>\n
\n \u52a8\u753b\u662f\u5728@keyframe\u89c4\u5219\u4e2d\u521b\u5efa\u7684\u3002\u5b83\u7528\u4e8e\u63a7\u5236CSS\u52a8\u753b\u5e8f\u5217\u4e2d\u7684\u4e2d\u95f4\u6b65\u9aa4\u3002\n <\/div>\n

\u52a8\u753b\u7684\u4f5c\u7528<\/h2>\n
\n \u52a8\u753b
\n \u4f7f\u5143\u7d20\u9010\u6e10\u4ece\u4e00\u79cd\u6837\u5f0f\u66f4\u6539\u4e3a<\/em>\u3002\u60a8\u53ef\u4ee5\u6dfb\u52a0\u8981\u6dfb\u52a0\u7684\u5c5e\u6027\u3002\u60a8\u8fd8\u53ef\u4ee5\u6307\u5b9a\u767e\u5206\u6bd4\u7684\u53d8\u5316\u30020\uff05\u6307\u5b9a\u52a8\u753b\u7684\u5f00\u59cb\uff0c\u800c100\uff05\u6307\u5b9a\u52a8\u753b\u7684\u5b8c\u6210\u3002\n <\/div>\n

CSS\u52a8\u753b\u7684\u5de5\u4f5c\u65b9\u5f0f<\/h2>\n
\n \u52a8\u753b\u65f6\u662f\u5728@keyframe\u89c4\u5219\u4e2d\u521b\u5efa\u7684\uff0c\u5fc5\u987b\u4e0e\u9009\u62e9\u5668\u7ed1\u5b9a\uff1b\u5426\u5219\u52a8\u753b\u5c06\u65e0\u6548\u3002\n <\/div>\n
\n \u53ef\u4ee5\u901a\u8fc7\u81f3\u5c11\u6307\u5b9a\u4ee5\u4e0b\u4e24\u4e2a\u5c5e\u6027\u5c06\u52a8\u753b\u7ed1\u5b9a\u5230\u9009\u62e9\u5668\uff1a\n <\/div>\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\n\n\n\n\n\n\n\n\n\n
\u5c5e\u6027<\/td>\n\u8bf4\u660e<\/td>\n<\/tr>\n
@keyframes <\/td>\n\u5b83\u7528\u4e8e\u6307\u5b9a\u52a8\u753b\u3002<\/td>\n<\/tr>\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
animation-delay<\/td>\n\u5b83\u6307\u5b9a\u52a8\u753b\u4f55\u65f6\u5f00\u59cb\u3002<\/td>\n<\/tr>\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
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
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
animation-iteration-count <\/td>\n\u5b83\u6307\u5b9a\u52a8\u753b\u64ad\u653e\u7684\u6b21\u6570\u3002<\/td>\n<\/tr>\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
animation-name<\/td>\n\u5b83\u6307\u5b9a@keyframes\u52a8\u753b\u7684\u540d\u79f0\u3002<\/td>\n<\/tr>\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
\n \u8ba9\u6211\u4eec\u770b\u4e00\u4e2a\u7b80\u5355\u7684CSS\u52a8\u753b\u793a\u4f8b\uff0c\u8be5\u793a\u4f8b\u5c06\u77e9\u5f62\u7684\u80cc\u666f\u989c\u8272\u4eceRED\u66f4\u6539\u4e3aBLACK\u3002\n <\/div>\n
\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
\n \u8f93\u51fa<\/strong>\n <\/div>\n

CSS \u52a8\u753b_https:\/\/bianchenghao6.com_\u3010CSS \u6559\u7a0b\u3011_\u7b2c1\u5f20 <\/p>\n

CSS\u52a8\u753b\u793a\u4f8b\uff1a\u79fb\u52a8\u77e9\u5f62<\/h2>\n
\n \u8ba9\u6211\u4eec\u518d\u4e3e\u4e00\u4e2a\u793a\u4f8b\u6765\u663e\u793a\u5177\u6709\u767e\u5206\u6bd4\u503c\u7684\u52a8\u753b\u3002\n <\/div>\n
\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 \u8f93\u51fa<\/strong>\n <\/div>\n

CSS \u52a8\u753b_https:\/\/bianchenghao6.com_\u3010CSS \u6559\u7a0b\u3011_\u7b2c2\u5f20
\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}]}}