HTML5¼¼Êõ

CSS3 animation-fill-mode ÊôÐÔ - Ziksang

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£º²©¿ÍÔ° 2016-02-18 14:00 ÎÒÒªÆÀÂÛ( )

ÏÖÔÚרעÓÚÒƶ¯¶Ë¿ª·¢ÏîÄ¿£¬¶ÔÓÚ¶¯»­Õâ¸öµãÊǷdz£ÖØÒªµÄ£¬Ã¿µ±ÎÒÓöµ½Ò»¸öеÄ֪ʶµã£¬ÎҾͻáºÍ´ó¼ÒÒ»Æð·ÖÏí animation-fill-mode :°ÑÎïÌ嶯»­µØ´ÓÒ»¸öµØ·½Òƶ¯µ½ÁíÒ»¸öµØ·½£¬²¢ÈÃËüÍ£ÁôÔÚÄÇÀï ¶¨ÒåºÍÓ÷¨ animation-fill-mode ÊôÐԹ涨µ±¶¯»­²»²¥·Åʱ£¨µ±¶¯

ÏÖÔÚרעÓÚÒƶ¯¶Ë¿ª·¢ÏîÄ¿£¬¶ÔÓÚ¶¯»­Õâ¸öµãÊǷdz£ÖØÒªµÄ£¬Ã¿µ±ÎÒÓöµ½Ò»¸öеÄ֪ʶµã£¬ÎҾͻáºÍ´ó¼ÒÒ»Æð·ÖÏí

animation-fill-mode :°ÑÎïÌ嶯»­µØ´ÓÒ»¸öµØ·½Òƶ¯µ½ÁíÒ»¸öµØ·½£¬²¢ÈÃËüÍ£ÁôÔÚÄÇÀï

¶¨ÒåºÍÓ÷¨

animation-fill-mode ÊôÐԹ涨µ±¶¯»­²»²¥·Åʱ£¨µ±¶¯»­Íê³Éʱ£¬»òµ±¶¯»­ÓÐÒ»¸öÑÓ³Ùδ¿ªÊ¼²¥·Åʱ£©£¬ÒªÓ¦Óõ½ÔªËصÄÑùʽ¡£

ĬÈÏÇé¿öÏ£¬CSS ¶¯»­ÔÚµÚÒ»¸ö¹Ø¼üÖ¡²¥·ÅÍê֮ǰ²»»áÓ°ÏìÔªËØ£¬ÔÚ×îºóÒ»¸ö¹Ø¼üÖ¡Íê³ÉºóÍ£Ö¹Ó°ÏìÔªËØ¡£animation-fill-mode ÊôÐÔ¿ÉÖØд¸ÃÐÐΪ¡£

ĬÈÏÖµ£º none

¼Ì³Ð£º ·ñ

¿É¶¯»­»¯£º ·ñ¡£

°æ±¾£º CSS3

JavaScript Óï·¨£º object.style.animationFillMode="forwards"

ÌرðÊǶÔÓÚJS¿ØÖÆÕâÒ»¿é£¬»¹¿ÉÒÔ½«Æä»Ö¸´µ½×îºóÒ»¸ö¹Ø¼üÖ¡Íê³ÉºóÍ£Ö¹Ó°ÏìµÄ״̬

Title div{ width height background position animation @keyframes move { from{ left to{ left } ÊÔÒ»ÊÔ window.onload = function(){ ) ] btn.onclick = function(){ div.style.animationFillMode } //°Ñ¶¯»­×´Ì¬»Ö¸´µ½×îºóÒ»Ö¡µÄ״̬ }

 

¡¡

1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

Ïà¹ØÎÄÕÂ
  • CSS3 Ñ¡ÔñÆ÷ - Glunefish

    CSS3 Ñ¡ÔñÆ÷ - Glunefish

    2017-04-22 09:00

  • HTML5ºÍCSS3 - ±¼ÅÜÔÚÆðÅÜÏßٮٮÕß

    HTML5ºÍCSS3 - ±¼ÅÜÔÚÆðÅÜÏßٮٮÕß

    2017-04-20 13:00

  • ¡¾CSS3¡¿¾«ÃÀºáÏò¹ö¶¯²Ëµ¥°´Å¥ - Glunefish

    ¡¾CSS3¡¿¾«ÃÀºáÏò¹ö¶¯²Ëµ¥°´Å¥ - Glunefish

    2017-04-14 14:00

  • ¡¾CSS3¶¯»­¡¿ÏÂÀ­²Ëµ¥Ä£Äâ - Glunefish

    ¡¾CSS3¶¯»­¡¿ÏÂÀ­²Ëµ¥Ä£Äâ - Glunefish

    2017-04-12 13:00

ÍøÓѵãÆÀ
Ò