Set the width of the body to the width of the window (controlled by the following script) $("body").css("width", $(window).width()); At the same time, set the overflow of the body (written in the style) body{ overflow-x: hidden;} ps: Similarly, the table in div is also handled in this way ![]() ![]() Set the width of tableContainer (written in the style) and tableMain (controlled by the script) to be equal to the width of tableMainHead Copy code The code is as follows:$(".tableMain").css("width", $(".tableMainHead").css("width")); Set the overflow of tableContainer to hidden (written in the style) This has a disadvantage, that is, when the browser window size changes, the content in the body cannot be automatically centered (the div that originally used percentages for width settings could be automatically centered using margin: auto, but now that the extra part is hidden, it cannot be automatically centered) |
>>: Share the pitfalls of MySQL's current_timestamp and their solutions
This article shares the specific code for WeChat ...
Maybe I started to think wrongly, and my descript...
This article introduces the sample code of CSS3 c...
question: My blog encoding is utf-8. Sometimes whe...
Table of contents 1. Add attributes 2. Merge mult...
1. Demand A picture moves from left to right in a...
MySQL installation is relatively simple, usually ...
I recently used a Mac system and was preparing to...
tar backup system sudo tar cvpzf backup.tgz --exc...
Preface I am used to writing less/sass, but now I...
Table of contents Preface Dockerfile What is a Do...
In the previous article, you have installed Docke...
Download address: https://dev.mysql.com/downloads...
Table of contents Slow query basics: optimizing d...
introduce Have you ever spent a whole day trying ...