How do CSS counters work?
问题 <!DOCTYPE html> <html> <head> <style> body { counter-reset: ele; } *::after { counter-increment: ele; content: "element count " counter(ele); } </style> </head> <body> <h1> h1 </h1> <h2> h2 </h2> <h2> h2 </h2> <h2> h2 </h2> <p><b> b </b> p</p> <br/> <br/> <br/> <br/> <br/> <br/> </body> </html> In the above snippet: It looks like all the <br/> tags getting ignored by CSS counters. The reason is? In the above snippet, what are elements 7 and 8 representing? 回答1: Explanation of the problem(s)