In recent days have been doing cell phone response, the main project requirements are compatible with PC-side and a variety of mobile phone screen display. In the process of doing the main encountered the following several problems.
First: The page of the module positioning or floating, will affect the response of the page, the solution is to let the module to the corresponding percentage of the parent element, and then use Display:-webkit-box (preceded by a compatible browser prefix) to make several modules occupy the same line.
Second: The width of the padding will always occupy position in the element, the response will be affected; The solution is to write the box-sizing:border-box in the corresponding element attribute, this sentence attribute to solve, so that the role of padding still exist, But browsers can also ignore the existence of padding.
Third: The page used to a tag, the span tag is more, these tags are row-level elements, in the process of using sometimes converted to block-level elements will affect the layout or response; The workaround is to set the width of the element to a percentage when converting to a block-level element, so there is no problem.
Now the Web page is doing more and more, some problems can be solved, but also to speed up. There's nothing wrong with the rest.
Learning Summary (15-12-21)