HTML5¼¼Êõ

¡¾Ðø¡¿×¥¸öFirefoxµÄС±è×Ó£¬jQuery±íʾ²»±³ÕâºÚ¹ø£¬Chrome,Edge,IE8-11¼ÌÐøΧ¹ÛÖÐ - ÈýÉúʯ(2)

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

!DOCTYPE htmlhtml xmlns="http://www.w3.org/1999/xhtml"headtitle/titlescript src="https://code.jquery.com/jquery-1.11.3.js"/scriptstyle*, :after, :before {-webkit-box-sizing: border-box;-moz-box-sizin

<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="https://code.jquery.com/jquery-1.11.3.js"></script> <style> *, :after, :before { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } </style> </head> <body> <fieldset> <legend>fieldset</legend> </fieldset> <script> $(function () { var elem = $('#fieldset1')[0]; var styles = window.getComputedStyle(elem); var val= jQuery.css(elem, "paddingTop", true, styles); elem.style.height = (200 - val) + "px"; alert(parseInt($('#fieldset1').height(), 10)); }); </script> </body> </html>¡¡¡¡

FirefoxÏÂÎÊÌâÒÀÈ»´æÔÚ£¬ºÜÃ÷ÏÔÊÇÔÚ jQuery.css ÖгöÏÖµÄÎÊÌ⣬¸ú×Ùµ½ jQuery µÄÔ´´úÂ룺

 

 

˵°×ÁË£¬Ò²ºÜ¼òµ¥¡£Í¨¹ý styles.getPropertyValue(name) || styles[name] À´»ñȡij¸öCSSÑùʽµÄÖµ¡£

ÏÂÃ棬ÔٴθüÐÂʾÀý£¬È¥³ý jQuery µÄÏà¹Ø´úÂ룺

<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="https://code.jquery.com/jquery-1.11.3.js"></script> <style> *, :after, :before { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } </style> </head> <body> <fieldset> <legend>fieldset</legend> </fieldset> <script> $(function () { var elem = $('#fieldset1')[0]; var styles = window.getComputedStyle(elem); var val = parseFloat(styles.getPropertyValue("paddingTop") || styles["paddingTop"]); elem.style.height = (200 - val) + "px"; alert(parseInt($('#fieldset1').height(), 10)); }); </script> </body> </html>¡¡¡¡¡¡¡¡

FirefoxÎÊÌâÒÀÈ»´æÔÚ£¬¶øÕâÀïÃæÎÒÃÇÉèÖà fieldset µÄ¸ß¶È¸ù±¾Ã»Óõ½ jQuery£¬Ö»Êǵ÷ÓÃÁËϵͳµÄ getCompotedStyle ·½·¨µÈ£¡£¡£¡

 

 

Öмä²å²¥Ò»¸ö¹ã¸æ£º

#######################################

#  9 ÄêÖ»×öÒ»¼þÊÂ

#  ÓÉÈýÉúʯÉÏÇ××Ô´òÔìµÄ FineUI ¿Ø¼þ¿â£¬ÏÖÒÑÖ§³Ö ASP.NET Core 2.0£¬¿çƽ̨ Windows¡¢Mac¡¢Linux ¶¼ÄÜÓã¡

#  ÔÚÏßʾÀý£º

########################################

¹ã¸æ½áÊø£¬Çë¼ÌÐø....

 

 

ÉÏÃ滹²»ÊÇ×î¼òµ¥£¬ÏÂÃæÎÒÃÇ´ÓÒ³ÃæÖÐÍêÈ«Åųý jQuery £¬3 ÐдúÂë¾ÍÄÜÖØÏÖÎÊÌ⣺

<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style> *, :after, :before { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } </style> </head> <body> <fieldset> <legend>fieldset</legend> </fieldset> <script> window.onload = function() { var elem = document.getElementById('fieldset1'); window.getComputedStyle(elem)["paddingTop"]; elem.style.height = "200px"; }; </script> </body> </html>¡¡¡¡

¡¡¡¡

ÔÚChromeºÍFirefoxϵÄÏÔʾЧ¹û¶Ô±È£¨ºóÃæÊÇChrome£¬Ç°ÃæÊÇFirefox£©£º

 

С½á

µÄµÄÈ·È·£¬ÕâÊÇ Firefox Quantum(v57) ÒÔ¼°ºÜ¶àÀÏ°æ±¾µÄBUG£¬ºÍ jQuery ûÓйØϵ£¬jQueryÖ»ÔÚ×öÁ˸Ã×öµÄÊÂÇ飬ÅöÇÉÓöµ½Õâ¸ö Firefox µÄBUG¶øÒÑ¡£

Õâ¸öBUGÔÚFirefoxÏÂÖØÏÖÐèÒªÂú×ãÈçϼ¸¸öÌõ¼þ£º

ÔÚÕâ 3 ¸öÌõ¼þÏ£¬µ÷ÓÃJS´úÂë window.getComputedStyle(elem)["paddingTop"] Ö®ºóÔÙÉèÖà fieldset ±êÇ©µÄ¸ß¶È£¬Ò³ÃæÉϲ»»á¸üУ¡

 

½â¾ö°ì·¨Çë¿´ÎÒµÄÉÏһƪÎÄÕ£º¡¾Ô­´´¡¿×¥¸öFirefoxµÄС±è×Ó£¬Î§¹ÛȺÖÚÓУºChrome¡¢Edge¡¢IE8-11

 

µãÔÞ

ϲ»¶ÈýʯµÄÎÄÕ£¬Äã¾Í¸ø¸öÍƼöߣ¡

 

¡¡

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

Ïà¹ØÎÄÕÂ
  • ÌØÊâ×Ö·ûµ¼ÖÂjquery-mobile ¹ÒÆð£¨firefox¿ØÖÆ̨±¨´í malformed URI sequence£©

    ÌØÊâ×Ö·ûµ¼ÖÂjquery-mobile ¹ÒÆð£¨firefox¿ØÖÆ̨±¨´í malformed URI

    2017-02-07 11:00

ÍøÓѵãÆÀ
«