You can't use them interchange. But you may also want to have a look at the name attribute, which is almost the same with id. Usually, I use both the ID and NAME, and set them to the same value.

bloor (bloor)
2001-3-28 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: 那位大侠能给我讲讲CSS里class=和id=的区别?我看了一些书,发现他们都没有讲明白,从举的例子看两者可以通用,对吗?

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论