Home > Article > Web Front-end > Bug handling when jQuery front-end framework easyui uses Dialog_jquery
I have been using the easyui front-end framework to develop and design UI recently, but when using Dialog, I found that if there is a lot of page content, problems will occur. First, take a look at my original code:
Please select to confirm the result:
p>
You can see several problems. One is that the mask layer does not completely cover the content of the web page. The other is that the dialog box is missing. Of course, it is not really missing, but it is displayed at the top of the page. You need to drag the scroll bar back. It can be seen at the end of the item that the reasons for this are very clear. First, the height of the web page content is incorrect. Only the height of the window (that is, the visual height) is obtained, and the mask is incomplete. Second, the positioning is incorrect. The scrollTop was not recognized correctly, resulting in inaccurate positioning of the dialog box. In response to these problems, I made corresponding improvements to solve the problem. The following is the improved code:
Please select to confirm the result:
p>
You can always stay in the middle of the web page even if you scroll. The effect is as follows:
The key code to ensure the above effect is: