HTML5¼¼Êõ

AlloyTouchʵÏÖÏÂÀ­Ë¢Ð - ¡¾µ±ÄÍÌØ¡¿

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2017-01-10 13:01 ÎÒÒªÆÀÂÛ( )

Ô­ÎĵØÖ·:https://github.com/AlloyTeam/AlloyTouch/wiki/Pull-to-refresh Ч¹ûչʾ ɨÂëÌåÑé ÄãÒ²¿ÉÒÔµã»÷ÕâÀï·ÃÎÊDemo ¿ÉÒÔµã»÷ÕâÀï²é¿´´úÂë ±³¾° ÔÚÊÖ»úQQÄÚ²¿£¬Æäʵ¿Í»§¶ËÌṩÁËÏÂÀ­Ë¢ÐµÄÄÜÁ¦£¬Í϶¯Õû¸öwebview½øÐÐÏÂÀ­Ë¢Ð£¬loadingÒÔ¼°loadingÏà¹ØµÄw

Ô­ÎĵØÖ·:https://github.com/AlloyTeam/AlloyTouch/wiki/Pull-to-refresh

Ч¹ûչʾ

ɨÂëÌåÑé

ÄãÒ²¿ÉÒÔµã»÷ÕâÀï·ÃÎÊDemo
¿ÉÒÔµã»÷ÕâÀï²é¿´´úÂë

±³¾°

ÔÚÊÖ»úQQÄÚ²¿£¬Æäʵ¿Í»§¶ËÌṩÁËÏÂÀ­Ë¢ÐµÄÄÜÁ¦£¬Í϶¯Õû¸öwebview½øÐÐÏÂÀ­Ë¢Ð£¬loadingÒÔ¼°loadingÏà¹ØµÄwordingºÍ¶¯»­¶¼ÊÇ¿Í»§¶ËµÄ¡£½â¾öÁËÒ»²¿·ÖÐèÒªÏÂÀ­³¡¾°µÄÎÊÌâ¡£µ«ÊÇÔÚijЩ³¡¾°Ï£¬»¹ÊÇÐèÒªwebÓµÓÐ×ÔÉíµÄÏÂÀ­Ë¢ÐµÄÄÜÁ¦¡£±ÈÈ磺

¶øÍ϶¯Õû¸öwebviewµÄÏÂÀ­Ë¢ÐÂÎÞ·¨Âú×ãÕâЩ³¡¾°¡£AlloyTouchºÜÃ÷ÏԷdz£Éó¤´¦ÀíwebÏÂÀ­Ë¢ÐµÄÐèÇó¡£

Ò³Ãæ¹Ç¼ÜʵÏÖ

pullRefreshÔÚAlloyTouch headerµÄÏÂÃ棬ÆäÖУº
header zIndex > pullRefresh zIndex >wrapperºÍscrollerµÄ zIndex¡£

ÏÂÀ­¶¯»­ÊµÏÖ

¿´ÒÔ¿´µ½£¬ÏÂÀ­µ½Ò»¶¨³Ì¶È£¬¼ýÍ·ÓиöÐýת¶¯»­£¬ÒÔ¼°wordingÃèÊöÒ²»á±ä»¯¡£ÕâÀïÖ÷ÒªÀûÓÃjsÈ¥Çл»classȥʵÏÖ£¬¶¯»­Ê¹ÓÃCSS transitionʵÏÖ¡£ËùÒÔÒªÔ¤Ïȶ¨ÒåºÃÁ½ÖÖclass¡£

.arrow { margin5px; margin5px; } ...(180deg)(180deg); } .20px.4s ease; }

ͨ¹ýÉÏÃ涨ҪºÃµÄclass£¬ÔÚjsÂß¼­ÀïÃæÖ»ÐèÒª¸ºÔðremoveºÍadd arrow_up clas±ã¿ÉÒÔʵÏÖ¼ýÍ·ÐýתºÍwordingµÄÇл»¡£

Loading¶¯»­ÊµÏÖ

xmlnspreserveAspectRatiorect xwidthfill... ... </svg>

loadingЧ¹ûʹÓÃSVGȥʵÏÖ£¬ÀûÓÃ12¸örectµÄ indefinite animateȥʵÏÖ¡£begin´ú±í¿ªÊ¼Ê±¼äÓиöµÝÔö´ïµ½loadingµÄЧ¹û¡£

ºËÐÄʵÏÖ

var scroller = document.querySelector("#scroller"), arrow = document.querySelector("#arrow"), pull_refresh = document.querySelector("#pull_refresh"), list = document.querySelector("#list"), index (pull_refresh(scroller(scroller.(value) .(evt) ..(evt) .()(at) .(len (.index.....); }

²»·Ï»°£¬¶¼ÔÚ×¢ÊÍÀï¡£

¿ªÊ¼AlloyTouch

Github£ºhttps://github.com/AlloyTeam/AlloyTouch

ÈκÎÒâ¼ûºÍ½¨Ò黶ӭnew issue£¬AlloyTouchÍŶӻáµÚһʱ¼ä·´À¡¡£


¡¡

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

Ïà¹ØÎÄÕÂ
  • Ò»¸ö¼òµ¥´Ö±©µÄÈËÁ³ÈÏÖ¤±ê×¢¹¤¾ßµÄʵÏÖ - ß÷¶ú¶ä

    Ò»¸ö¼òµ¥´Ö±©µÄÈËÁ³ÈÏÖ¤±ê×¢¹¤¾ßµÄʵÏÖ - ß÷¶ú¶ä

    2017-01-05 11:01

  • Dropzone.jsʵÏÖÎļþÍÏקÉÏ´« - СÐܼªÃ×

    Dropzone.jsʵÏÖÎļþÍÏקÉÏ´« - СÐܼªÃ×

    2017-01-05 09:00

  • ASP.Net MVC4+Memcached+CodeFirstʵÏÖ·Ö²¼Ê½»º´æ - ±¼ÅÜ°É£¡Ð¡¹ù

    ASP.Net MVC4+Memcached+CodeFirstʵÏÖ·Ö²¼Ê½»º´æ - ±¼ÅÜ°É£¡Ð¡¹ù

    2017-01-01 13:00

  • iosselect£ºÒ»¸öjs pickerÏîÄ¿£¬ÔÚH5ÖÐʵÏÖIOSµÄselectÏÂÀ­¿òЧ¹û - mufc-go

    iosselect£ºÒ»¸öjs pickerÏîÄ¿£¬ÔÚH5ÖÐʵÏÖIOSµÄselectÏÂÀ­¿òЧ¹û -

    2017-01-01 10:02

ÍøÓѵãÆÀ
Å