Layout-neutral tag for CSS?

前端 未结 8 2039
执笔经年
执笔经年 2021-01-05 05:14

Is there an \"invisible\" tag in HTML (4) that I can use to make CSS distinctions

tag.myclass tag.mysubclass h1 {  } 

without having

8条回答
  •  悲&欢浪女
    2021-01-05 05:57

    No, there is not.

    (And that's because such an element wouldn't really fit into the rest of HTML. The only reason DIV and SPAN affect the surrounding area is because they're block and inline elements, respectively. What would an 'invisible' element be? If you need something that's completely independent, absolutely (or relatively) position it and give it a higher z-index.)

提交回复
热议问题