ÔÚÒ»´ÎÏîÄ¿ÖУ¬ÓÐÒ»´ÎÒªÓõ½::selectionÎ±ÔªËØ£¬È»ºó¿ª·¢Í¬Ñ§ÎÊÎÒ£¬CSSÖÐÒ»¸öðºÅºÍÁ½¸öðºÅÓÐÉñÂíÇø±ð£¿
ÕâºÃÏñÕæµÄÊǸöÎÊÌ⣬»òÐíºÜ¶àǰ¶Ëͬѧ¶Ô´Ë¶¼ÓÐÒɻ󣬲éÁËЩ×ÊÁÏ£¬Ö¤ÊµÁËÏÂÁ½¸ö·ûºÅµÄÇø±ð£¬¼ò¶øÑÔÖ®£ºµ¥Ã°ºÅ(:)ÓÃÓÚCSS3αÀ࣬˫ðºÅ(::)ÓÃÓÚCSS3Î±ÔªËØ¡£
W3C¹ØÓÚCSS3Ñ¡ÔñÆ÷µÄ¹æ·¶ÖÐÓÐÒ»¶ÎÃèÊö£º
A pseudo-element is made of two colons (::) followed by the name of the pseudo-element.
This :: notation is introduced by the current document in order to establish a discrimination between pseudo-classes and pseudo-elements. For compatibility with existing style sheets, user agents must also accept the previous one-colon notation for pseudo-elements introduced in CSS levels 1 and 2 (namely, :first-line, :first-letter, :before and :after). This compatibility is not allowed for the new pseudo-elements introduced in CSS level 3.
¼òµ¥·Òëһϣ¬´óÒâ¾ÍÊÇ£¬Î±ÔªËØÓÉ˫ðºÅºÍÎ±ÔªËØÃû³Æ×é³É¡£Ë«Ã°ºÅÊÇÔÚµ±Ç°¹æ·¶ÖÐÒýÈëµÄ£¬ÓÃÓÚÇø·ÖαÀàºÍÎ±ÔªËØ¡£µ«ÊÇαÀà¼æÈÝÏÖ´æÑùʽ£¬ä¯ÀÀÆ÷ÐèҪͬʱ֧³Ö¾ÉµÄαÀ࣬±ÈÈç:first-line¡¢:first-letter¡¢:before¡¢:afterµÈ¡£
ÄÇôÏÖÔھͿÉÒÔÍêÕûµÄ»Ø´ð±êÌâÖеÄÎÊÌâÁË£¬¶ÔÓÚCSS2֮ǰÒÑÓеÄÎ±ÔªËØ£¬±ÈÈç:before£¬µ¥Ã°ºÅºÍ˫ðºÅµÄд·¨::before×÷ÓÃÊÇÒ»ÑùµÄ¡£
ËùÒÔ£¬Èç¹ûÄãµÄÍøÕ¾Ö»ÐèÒª¼æÈÝwebkit¡¢firefox¡¢operaµÈä¯ÀÀÆ÷£¬½¨Òé¶ÔÓÚÎ±ÔªËØ²ÉÓÃ˫ðºÅµÄд·¨£¬Èç¹û²»µÃ²»¼æÈÝIEä¯ÀÀÆ÷£¬»¹ÊÇÓÃCSS2µÄµ¥Ã°ºÅд·¨±È½Ï°²È«¡£
¡¡