File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -871,9 +871,21 @@ cc.ContainerStrategy = cc.Class.extend({
871871 locContainer . style . width = w + "px" ;
872872 locContainer . style . height = h + "px" ;
873873
874- var body = document . body ;
875- if ( body )
876- body . style . padding = body . style . border = body . style . margin = 0 + "px" ;
874+ var body = document . body , style ;
875+ if ( body && ( style = body . style ) ) {
876+ style . paddingTop = style . paddingTop || "0px" ;
877+ style . paddingRight = style . paddingRight || "0px" ;
878+ style . paddingBottom = style . paddingBottom || "0px" ;
879+ style . paddingLeft = style . paddingLeft || "0px" ;
880+ style . borderTop = style . borderTop || "0px" ;
881+ style . borderRight = style . borderRight || "0px" ;
882+ style . borderBottom = style . borderBottom || "0px" ;
883+ style . borderLeft = style . borderLeft || "0px" ;
884+ style . marginTop = style . marginTop || "0px" ;
885+ style . marginRight = style . marginRight || "0px" ;
886+ style . marginBottom = style . marginBottom || "0px" ;
887+ style . marginLeft = style . marginLeft || "0px" ;
888+ }
877889 } ,
878890
879891 _fixContainer : function ( ) {
You can’t perform that action at this time.
0 commit comments