Online said a lot of, say what set the width of Div, especially this article:
Http://www.divcss5.com/wenji/w632.shtml
Kill people, why should we automatically scale? is not the phone screen too much resolution? How do you scale the width you specify? Your sister's.
After many experiments, I found a better method, which can be displayed perfectly in ios/browser and Android/browser, that is:
1, Div does not make the request, the content center is good
2, put a table in, table width=100%, this is the most critical
3, in TD put a img,img of max-width:100%;
That's OK!
Attach a style sheet:
Table {
width:100%;
margin:0 Auto;
Background: #2d2d2d; /* Browsers that Don's support RGBA */
Background:rgba (45,45,45,.15);
font-family: ' PT Sans ', Helvetica, Arial, Sans-serif;
font-size:20px;
/*color: #0; Can't use 1 x 0 */
Border:none;
Border-collapse:collapse;
text-shadow:0 1px 2px Rgba (0,0,0,.3);
}
rd=
/* max-width:100%; Mozilla supports a max-width CSS syntax */
Background: #ffffff;
Border:none; /*solid #000 1px;*/
Vertical-align:center;
Text-align:center;
Color: #000;
}
/* Share page Picture auto-zoom device screen Width */
img.sharepage{
max-width:100%;
}
How to zoom out of a TD or a picture in a table (CSS problem) picture Autoscale