HTML5¼¼Êõ

css3 transition animation nick - webNick

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2016-11-07 13:00 ÎÒÒªÆÀÂÛ( )

ʱ¹âתÑÛ¼´ÊÅ£¬ÓÖµ½ÖÜÁùÁË£¬½ñÌìдµãij²¿·ÖÈË¿´²»ÆðµÄcssÍæÍ棡 ת»» ת»»ÊôÐÔ transform: ä¯ÀÀÆ÷ǰ׺: -webkit-transform;-o-transform;-moz-transform;-ms-transform; È¡Öµ£º none : ĬÈÏÖµ£¬Ã»ÓÐת»»²Ù×÷ transform-function:Ò»×éת»»º¯Êý transform:º¯Êý

ʱ¹âתÑÛ¼´ÊÅ£¬ÓÖµ½ÖÜÁùÁË£¬½ñÌìдµãij²¿·ÖÈË¿´²»ÆðµÄcssÍæÍ棡

ת»» ת»»ÊôÐÔtransform:

ä¯ÀÀÆ÷ǰ׺:
-webkit-transform;-o-transform;-moz-transform;-ms-transform;
È¡Öµ£º
none : ĬÈÏÖµ£¬Ã»ÓÐת»»²Ù×÷
transform-function:Ò»×éת»»º¯Êý
transform:º¯Êý1() º¯Êý2() ......;

ת»»µÄÔ­µãtransform-origin

ÔÚ²»Ö¸¶¨Ô­µãÇ°ÌáÇ°£¬Ä¬ÈÏÔ­µãΪԪËصÄÖÐÐÄ´¦
È¡Öµ£ºÊýÖµ/°Ù·Ö±È/¹Ø¼ü×Ö
Ò»¸öÖµ£ºËùÓÐÖáλÖÃ
Á½¸öÖµ£º±íʾxÖáºÍyÖá
Èý¸öÖµ£º±íʾxÖᣬyÖᣬzÖá

2Dת»» 2DλÒÆ

º¯Êý:translate()
È¡Öµ£º
translate(x) : Ö»×öxÖá(ºáÏò)Òƶ¯
translate(x,y) : ×öxÖáºÍyÖáµÄÒƶ¯
·½Ïò£º¿´·ûºÅ

+ ÏòÓÒ¡¢ÏòÏÂ
- Ïò×ó¡¢ÏòÉÏ

×¢Ò⣺

È¡Öµ¿ÉÒÔΪÊýÖµ»ò°Ù·Ö±È¡¢¸ºÊý
µ¥ÏòλÒƺ¯Êý:
translateX(x) : Ö»×öxÖáÒƶ¯
translateY(y) : Ö»×öyÖáÒƶ¯

Ëõ·Å

¸Ä±äÔªËصijߴç
º¯Êý:scale()
È¡Öµ£º
1¸öÖµ£º±íʾµÚÒ»¸öÖµºÍµÚ¶þ¸öÖµÊÇÏàµÈµÄ
2¸öÖµ£ºµÚÒ»¸ö x µÚ¶þ¸ö y
µ¥ÏòËõ·Åº¯Êý£º
scaleX(x),scaleY(y)
È¡Öµ:
ĬÈÏÖµ Ϊ1
ËõС£º0-1Ö®¼äµÄСÊý
·Å´ó£º´óÓÚ1µÄÊýÖµ

 Ðýת

º¯Êý£ºrotate()
È¡Öµ£ºrotate(ndeg)
n : ¾ßÌå½Ç¶ÈÖµ
nΪÕý£¬ Ôò˳ʱÕëÐýת
nΪ¸º£¬ ÔòÄæʱÕëÐýת

 Çãб

º¯Êý£ºskew()
skewx() --xÖáÇãб
skewy() --yÖáÇãб

¹ý¶É  ¹ý¶ÉÊôÐÔ

×÷ÓãºÖ¸¶¨ÔªËØÔÚÄÄЩcssÊôÐÔÉϵı仯»á²úÉú¹ý¶ÉµÄЧ¹û£¨±ØÐëµÄ£©
ÊôÐÔ£ºtransition-property
È¡Öµ£ºnone | all | property
eg:transition-property:background;
eg:transition-property:background,width,height;

¹ý¶Éʱ¼ä

×÷ÓãºÖ¸¶¨¹ý¶ÉЧ¹ûÔڶ೤ʱ¼äÄÚÍê³É¡£
×¢Ò⣺¿ÉÒÔÒÔ s | ms Ϊµ¥Î».¸ÃÊôÐÔ²»ÄÜÊ¡ÂÔ£¬Ò»µ©Ê¡ÂÔÔòûÓйý¶ÉЧ¹û
ÊôÐÔ£ºtransition-duration
È¡Öµ£ºs|ms
eg:transition-duration:5s;
eg:transition-duration:5s,1s,1s;

¹ý¶Éʱ¼äËÙ¶ÈÇúÏߺ¯Êý

×÷Ó㺶¨ÒåÕû¸ö¹ý¶ÉЧ¹ûµÄËÙÂÊ¡£±ÈÈç ÏÈ¿ìºóÂý£¬»¹ÊÇ ÏÈÂýºó¿ì£¬»òÕß»¹ÊÇÔÈËÙ
ÊôÐÔ:transition-timing-function
È¡Öµ£ºÔ¤¶¨ÒåÖµ»ò±´Èû¶ûÇúÏß
ease : ĬÈÏÖµ£¬ÂýËÙ¿ªÊ¼£¬¿ìËÙ±ä¿ì£¬ÒÔÂýËÙ½áÊø
linear:ÔÈËÙ
ease-in£ºÂýËÙ¿ªÊ¼£¬¼ÓËÙЧ¹û
ease-out:ÂýËÙ½áÊø(¿ìËÙ¿ªÊ¼),¼õËÙЧ¹û
ease-in-out:ÂýËÙ¿ªÊ¼ºÍ½áÊø£¬ÖмäÏȼӺó¼õ
eg:transition-timing-function:linear;

¹ý¶ÉÑÓ³Ù

×÷Ó㺼¤·¢¹ý¶É²Ù×÷ºó£¬µÈ´ý¶à³¤Ê±¼äºó²Å¿ªÊ¼Ö´Ðйý¶ÉЧ¹û
ÊôÐÔ:transition-delay
È¡Öµ£ºÒÔ s | msΪµ¥Î»µÄʱ¼ä
eg:transition-delay:5s;

¼òд¹ý¶ÉÊôÐÔ  transition

ÊôÐÔ£ºtransition
È¡Öµ£ºÒÔ¿Õ¸ñ·Ö¿ªµÄÖµÁбí
property duration timing-function delay;
eg:transition:background 1s linear 0s;
transition:background 1s;
¶à¸ö¹ý¶ÉЧ¹û:
transition : background 1s linear 0s,
color 2s linear 0s,
border-radius 3s linear 1s;

¶¯»­

¶¯»­µÄÏêϸ²ÎÊýÈ¥¿´w3c°É£¡

ÕâÀï¾ÍÌáÏÂ×¢ÒâµÄµØ·½£º

@keyframesÓï·¨£º£¨µ¥¶Àд£¬ÔÚÑ¡ÔñÆ÷Í⣬styleÄÚ£© @keyframes name{ from {cssÑùʽ£»} percent{cssÑùʽ£»} to {cssÑùʽ£»} } animationÓï·¨£º£¨Ð´ÔÚÑ¡ÔñÆ÷ÄÚ£© animation£ºname duration timing-function delay iteration-count direction£»

animation-fill-mode

£¨ie10+£©ÊôÐԹ涨¶¯»­ÔÚ²¥·Å֮ǰ»òÖ®ºó£¬Æ䶯»­Ð§¹ûÊÇ·ñ¿É¼û¡£

none --²»¸Ä±äĬÈÏÐÐΪ¡£

forwards-- µ±¶¯»­Íê³Éºó£¬±£³Ö×îºóÒ»¸öÊôÐÔÖµ£¨ÔÚ×îºóÒ»¸ö¹Ø¼üÖ¡Öж¨Ò壩¡£

backwards --ÔÚ animation-delay ËùÖ¸¶¨µÄÒ»¶Îʱ¼äÄÚ£¬ÔÚ¶¯»­ÏÔʾ֮ǰ£¬Ó¦ÓÿªÊ¼ÊôÐÔÖµ £¨ÔÚµÚÒ»¸ö¹Ø¼üÖ¡Öж¨Ò壩¡£

both --ÏòÇ°ºÍÏòºóÌî³äģʽ¶¼±»Ó¦Óá£

 ËµµÄÒ²²î²»¶àÁË£¬Ö±½ÓÉÏ´úÂ룡

¡¡

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

Ïà¹ØÎÄÕÂ
  • ÈÃIE9ÒÔÏ°汾µÄä¯ÀÀÖ§³Öhtml5,CSS3µÄ²å¼þ - ½ÐÎÒСÁú¸ç

    ÈÃIE9ÒÔÏ°汾µÄä¯ÀÀÖ§³Öhtml5,CSS3µÄ²å¼þ - ½ÐÎÒСÁú¸ç

    2016-11-04 12:00

  • CSS3»ù´¡01 - Ë®Çå·çi

    CSS3»ù´¡01 - Ë®Çå·çi

    2016-11-03 14:00

  • css3¶¯»­animation - danran68

    css3¶¯»­animation - danran68

    2016-10-29 13:00

  • css3 text-shadow×ÖÌåÒõÓ°½²½â - danran68

    css3 text-shadow×ÖÌåÒõÓ°½²½â - danran68

    2016-10-25 15:00

ÍøÓѵãÆÀ
·