ÔÚÒ»´ÎÏîÄ¿ÖУ¬ÓÐÒ»´ÎÒªÓõ½::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µÄµ¥Ã°ºÅд·¨±È½Ï°²È«¡£
¡¡