In web pages, the layout of tables is often visible. When the number of rows in a table is very large, it can easily lead to visual fatigue, and it is easy for users to read the data of the adjacent two rows. We can improve the user experience by changing the color of the line and highlighting it! If css is used, the front-end code is not elegant, for example, in the odd SyntaxHighlighter. all (); in the web page, the layout of the table is often visible. When there are many rows in the table, it is easy to cause visual fatigue, in addition, it is easy for users to misread data from two adjacent rows. We can improve the user experience by changing the color of the line and highlighting it! If css is used for implementation, the front-end code will be slightly less elegant. For example, we need to addThis code can be used to achieve line-by-line color change. If the webpage is dynamically output from the background, this cannot be implemented unless it is controlled by a program. Tr: hover is not supported in ie6. So we still cannot fully meet our requirements. Here we can use javascript to help us achieve the above requirements. It is mainly used to operate the DOM.
First, check the HTML code:
01 |
< h1 > Member information table h1 > |
02 |
< table summary = "user infomation table" > |
10 |
< th > Registration Time th > |