Fixed table header makes the form scroll horizontally
Apr 16, 2018 pm 04:56 PMThis time I will bring you the fixed table header to make the form scroll horizontally, and the fixed table header to make the form scroll horizontally. 1. The header is wrapped with a table and wrapped with p, and the specific content of
tableis wrapped with a table 2. Use positon: relative to position the p outside the head
3. Get the height of the entire table
4. Get the distance between the DOM of the table (or the DOM wrapping the table) and the top of the page offsetTop
5. The distance between the zero point of scrolling, the height of the table, and the distance between the table and the top of the page. If the scroll exceeds this, the top value of the head will be returned to 0 or left unchanged. Of course, there are many areas that can be optimized. Just showing a little idea hehehe
Off topic, why do you use red meter? Because it is conspicuous. Haha
JS Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website! Recommended reading:
Bootstrap drop-down plug-in dropdown usage tipsDetailed explanation of tofixed and round usage in JS
AngularJS makes input box character limit reminder
The above is the detailed content of Fixed table header makes the form scroll horizontally. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to implement page jump after PHP form submission

How to handle user rights management in PHP forms

How to use JavaScript to implement real-time verification of the input box content of a form?

How to use JavaScript to realize the automatic prompt function of the input box content of the form?

PHP form processing: form data query and filtering

How to use HTML, CSS and jQuery to realize the advanced function of automatic saving of forms

How to create a form with a floating prompt using HTML, CSS and jQuery

Tips for using Laravel form classes: ways to improve efficiency
