µ±Ç°Î»ÖãºÊ×Ò³ -> ×ÛºÏƵµÀ -> Õ¾³¤Ö®¼Ò

iPad / iPhone Safari CSS width 100% ..

µ÷ÊÔ iPad »ò iPhone ¿ÉÔÚÉèÖÃÖÐÆô¶¯µ÷ÊÔģʽ£¬ÔÚ Mac ÖÐµÄ Safari ä¯ÀÀÆ÷ ͬÑù¿ªÆô¿ª·¢Õßģʽºó£¬½øÐÐÁª»úµ÷ÊÔ¡£¹¦Äܱ뺷¡£

×î½üÔÚ×öÒ»¸öÒ³Ãæʱ£¬·¢ÏÖÔÚ iPad µÄ Safari ä¯ÀÀÆ÷Öб³¾°ÏÔʾ²»È«£¬¶¨Î»µ½¸Ã div ºó·¢ÏÖËùÖ¸¶¨ css µÄ¿í¶ÈΪ 100% £»

µ½°Ù¶ÈËÑË÷ºó·¢ÏÖ£¬safari ÖÐ viewport ĬÈÏ¿í¶ÈΪ 980px£¬ÈôÊÂÏÈδָ¶¨Æä³õʼ viewport ¿í¶È£¬Ôò»áĬÈÏ°´ÕÕ 980px ´¦Àí¡£

¿ÉÒÔĬÈϳõʼ»¯ viewport ¿í¶È»òÔÚ css ÖÐÉ趨 min-width£¬µ«×î¼òµ¥µÄ·½·¨¿ÉÒÔÔÚ head ±êÇ©Öгõʼ»¯ºÃ viewport¡£

 

Ïê¼ûÏ·½´úÂ룺

<metaname="viewport"content="width=ÍøÒ³Õæʵ¿í¶È, initial-scale=±¶ÊýÖµ"/> 
¼ÙÉèÍøÒ³¿í¶ÈΪ 960px »ò 1080px£¬¿ÉÔÚwidthÖмÓÈë¸ÃÖµ£¬²¢½« initial-scale ÉèÖÃÒ»¸öÊʺϵı¶ÊýÖµ¡£

ÀýÈçÒ»¸öÒ³ÃæµÄ¿í¶ÈΪ 1080px£¬ÔòÉ趨Ϊ£º

<metaname="viewport"content="width=1080, initial-scale=0.9"/> 
ÕâÑù²»¹Ü¼ÓÔØÇ°ºóÇл»ºáÆÁ»¹ÊÇÊúÆÁ£¬¶¼¿ÉÒÔÓѺÃÏÔʾ¡£


²ÂÄãϲ»¶