jQuery Mobile ¹¤¾ßÀ¸
jQuery Mobile ¹¤¾ßÀ¸
¹¤¾ßÀ¸ÔªËس£±»·ÅÖÃÓÚҳüºÍÒ³½ÅÖÐ - ÒÔʵÏÖ¡°ÒÑ·ÃÎÊ¡±µÄµ¼º½£º
±êÌâÀ¸
ҳüͨ³£»á°üº¬Ò³Ã¼±êÌâ/LOGO »òÒ»µ½Á½¸ö°´Å¥£¨Í¨³£ÊÇÊ×Ò³¡¢Ñ¡Ïî»òËÑË÷°´Å¥£©¡£
Äú¿ÉÒÔÔÚҳüÖÐÏò×ó²à»ò/ÒÔ¼°ÓÒ²àÌí¼Ó°´Å¥¡£
ÏÂÃæµÄ´úÂ룬½«Ïòҳü±êÌâÎı¾µÄ×ó²àÌí¼ÓÒ»¸ö°´Å¥£¬²¢ÏòÓÒ²àÌí¼ÓÒ»¸ö°´Å¥£º
ʵÀý
<div data-role="header"> <a href="#" data-role="button">Ê×Ò³</a> <h1>»¶ÓÀ´µ½ÎÒµÄÖ÷Ò³</h1> <a href="#" data-role="button">ËÑË÷</a> </div>
ÏÂÃæµÄ´úÂ뽫Ïòҳü±êÌâµÄ×ó²àÌí¼ÓÒ»¸ö°´Å¥£º
<div data-role="header"> <a href="#" data-role="button">Ê×Ò³</a> <h1>»¶ÓÀ´µ½ÎÒµÄÖ÷Ò³</h1> </div>
²»¹ý£¬Èç¹ûÄúÔÚ <h1> ÔªËØÖ®ºó·ÅÖð´Å¥Á´½Ó£¬ÄÇôËü²»»áÏÔʾÔÚÎı¾ÓҲࡣÈçÐèÏòҳü±êÌâµÄÓÒ²àÌí¼Ó°´Å¥£¬Çë¹æ¶¨ÀàÃû "ui-btn-right"£º
ʵÀý
<div data-role="header">
<h1>»¶ÓÀ´µ½ÎÒµÄÖ÷Ò³</h1>
<a href="#" data-role="button" class="ui-btn-right"
>ËÑË÷</a>
</div>
Ìáʾ£ºÒ³Ã¼¿É°üº¬Ò»¸ö»òÁ½¸ö°´Å¥£¬È»¶øÒ³½ÅûÓÐÏÞÖÆ¡£
Ò³½ÅÀ¸
ÓëҳüÏà±È£¬Ò³½Å¸ü¾ßÉìËõÐÔ - ËüÃǸüʵÓÃÇÒ¶à±ä£¬ËùÒÔÄܹ»°üº¬ËùÐèÊýÁ¿µÄ°´Å¥£º
ʵÀý
<div data-role="footer"> <a href="#" data-role="button">ת²¥µ½ÐÂÀË΢²©</a> <a href="#" data-role="button">ת²¥µ½ÌÚѶ΢²©</a> <a href="#" data-role="button">ת²¥µ½ QQ ¿Õ¼ä</a> </div>
×¢ÊÍ£ºÒ³½ÅÓëҳüµÄÑùʽ²»Í¬£¨Ëü»á¼õȥһЩÄڱ߾àºÍ¿Õ°×£¬²¢ÇÒ°´Å¥²»»á¾ÓÖУ©¡£Èç¹ûÒªÐÞÕý¸ÃÎÊÌ⣬ÇëÔÚÒ³½ÅÉèÖÃÀàÃû "ui-btn"£º
ʵÀý
<div data-role="footer" class="ui-btn">
ÄúÒ²Äܹ»Ñ¡ÔñÔÚÒ³½ÅÖÐˮƽ»¹ÊÇ´¹Ö±µØ×éºÏ°´Å¥£º
ʵÀý
<div data-role="footer" class="ui-btn"> <div data-role="controlgroup" data-type="horizontal"> <a href="#" data-role="button" data-icon="plus">ת²¥µ½ÐÂÀË΢²©</a> <a href="#" data-role="button" data-icon="plus">ת²¥µ½ÌÚѶ΢²©</a> <a href="#" data-role="button" data-icon="plus">ת²¥µ½ QQ ¿Õ¼ä</a> </div> </div>
¶¨Î»Ò³Ã¼ºÍÒ³½Å
·ÅÖÃҳüºÍÒ³½ÅµÄ·½Ê½ÓÐÈýÖÖ£º
- Inline - ĬÈÏ¡£Ò³Ã¼ºÍÒ³½ÅÓëÒ³ÃæÄÚÈÝλÓÚÐÐÄÚ¡£
- Fixed - Ò³ÃæºÍÒ³½Å»áÁôÔÚÒ³Ãæ¶¥²¿ºÍµ×²¿¡£
- Fullscreen - Óë fixed ÀàËÆ;Ò³ÃæºÍÒ³½Å»áÁôÔÚÒ³Ãæ¶¥²¿ºÍµ×²¿£¬but also over the page content. It is also slightly see-through
ÇëʹÓà data-position ÊôÐÔÀ´¶¨Î»Ò³Ã¼ºÍÒ³½Å£º
Inline ¶¨Î»£¨Ä¬ÈÏ£©
<div data-role="header"data-position="inline"
></div> <div data-role="footer"data-position="inline"
></div>
Fixed ¶¨Î»
<div data-role="header"data-position="fixed"
></div> <div data-role="footer"data-position="fixed"
></div>
Èç¹ûÐèÒªÆôÓÃÈ«Ãæ¶¨Î»£¬ÇëʹÓà data-position="fixed"£¬²¢Ïò¸ÃÔªËØÌí¼Ó data-fullscreen ÊôÐÔ£º
Fullscreen ¶¨Î»
<div data-role="header" data-position="fixed"data-fullscreen="true"
></div> <div data-role="footer" data-position="fixed"data-fullscreen="true"
></div>
Ìáʾ£ºfullscreen ¶ÔÓÚÕÕÆ¬¡¢Í¼ÏñºÍÊÓÆµ·Ç³£ÀíÏë¡£
Ìáʾ£º¶ÔÓÚ fixed ºÍ fullscreen ¶¨Î»£¬´¥ÃþÆÁÄ»½«Òþ²ØºÍÏÔʾҳü¼°Ò³½Å¡£