Home > Article > Web Front-end > Compatibility issues for different browsers and different resolutions_html/css_WEB-ITnose
My resolution is 1920*1080, and the website is centered. When I switch to a computer with a resolution of 1024*768, some sections are tilted to the right. Is there any attribute that can automatically scale for different resolutions?
Take a look at responsive design
Reference http://www.360doc.com/content /13/0219/12/21412_266515627.shtml
Use percentages in the properties of the box model, such as
width:30%
padding:2% 5%
Solved, what I want is centered, margin:0 auto; This is solved, thank you everyone
Then don’t use px, try to use % to define the width