How to zoom out of a TD or a picture in a table (CSS problem) picture Autoscale

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.