lmlphp official website and blog Mobile Station on-line News
Maybe yes posted on 2015-01-12 14:32
Original link: http://blog.lmlphp.com/archives/60 from: lmlphp backyard
After Sunday of efforts, an afternoon plus night, lmlphp official website Mobile Station and lmlphp official blog mobile phone Station officially launched. At present, all the pages in MI2 's own browser, UC browser, Baidu browser and Samsung Galaxy S4 mini QQ browser display is normal, the effect is relatively satisfactory, after all, the same content to be compatible with different size of the device display or some difficulty.
In the cell phone station, the site width is set to 100%, the basic no specific width, HTML structure as simple as possible, for the maximum compatibility. At the same time also found some problems, is the picture of the display is not easy to get. In the View-port statement, the construction of mobile phone station has become much simpler, the site PX units naturally changed to a length unit, the same size of the same cell phone resolution, declared the View-port after a line to display the same number of words, which I used the Xiaomi 2 and Samsung Galaxy S4 Mini To test the results. When doing mobile station, deeply feel because the function of different website of the device also will be different, so the mobile station independent template is the better choice, I personally do not recommend using BootStrap and some very complex front-end frame to do.
If after the page load, calculate the corresponding size of the handheld device, and then the document in the width and height of the picture is reduced, the picture will be more beautiful, the main content of the site is now the picture is set to the maximum width of 90%, so there is a drawback is loaded document, The height of the image is invalid, the height of the display is very small, just enough to show the Alt attribute, with the page scrolling and asynchronous loading triggered, the page will continue to be large, and the PC station page is not the problem, and then continue to optimize.
What units of measurement should I use for Mobile station development as a unit of font size? This problem I also read a lot of articles before the cell phone station, such as em,pt,px,% (percentage), and now think that the site construction set the best font size unit should be the use of "px", absolutely no longer to doubt.
Should you use a standalone domain name or a standalone URL for mobile station development? The station's mobile station is based on the UA (useragent) to show that some of the current new Web sites are so, there is no need to open the independent domain name, so late maintenance will be very troublesome.
How to switch the PC station and mobile station of this station? The system by default according to the UA to determine which template to display, of course, you can also use the parameter theme=default|mobile to switch, the default parameter shows the defaults of the PC template, the mobile parameter shows the device template. After switching, the template will remain in the same style as it appears during the session. If you want a single page to display one template at a time, you can pass the theme parameter while passing the parameter switch_theme_once.
Attach the mobile station and PC station Toggle Link:
lmlphp website Mobile Station Link: http://www.lmlphp.com/?theme=mobile
lmlphp website PC Station Link: http://www.lmlphp.com/?theme=default
lmlphp Official Blog Mobile Station Link: http://blog.lmlphp.com/?theme=mobile
lmlphp Official Blog PC Station Link: http://blog.lmlphp.com/?theme=default
Read (57) reviews (0) View comments
Lmlphp official website and blog Mobile Station on-line