css3¼¼Êõ

CSS3ʵÀý½âÎö:αÀàÇ°µÄðºÅºÍÁ½¸öðºÅµÄÇø±ð_div+css½Ì³Ì

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2015-09-17 16:49 ÎÒÒªÆÀÂÛ( )

CSS3ʵÀý½âÎö:αÀàÇ°µÄðºÅºÍÁ½¸öðºÅµÄÇø±ð,ѧϰCSS3ʵÀý½âÎö:αÀàÇ°µÄðºÅºÍÁ½¸öðºÅµÄÇø±ð,CSS3ʵÀý½âÎö:αÀàÇ°µÄðºÅºÍÁ½¸öðºÅµÄÇø±ð,²é¿´CSS3ʵÀý½âÎö:α

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

¡¡

1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

Ïà¹ØÎÄÕÂ
  • css3µÄbox-shadow×¢ÒâÊÂÏî_div+css½Ì³Ì

    css3µÄbox-shadow×¢ÒâÊÂÏî_div+css½Ì³Ì

    2015-09-17 16:59

  • CSS3¼òµ¥ÊµÓõÄÊôÐÔ_div+css½Ì³Ì

    CSS3¼òµ¥ÊµÓõÄÊôÐÔ_div+css½Ì³Ì

    2015-09-17 16:58

  • CSS3µÄborder-radius_div+css½Ì³Ì

    CSS3µÄborder-radius_div+css½Ì³Ì

    2015-09-17 16:58

  • CSS3ÖеÄÊôÐÔÑ¡Ôñ·û_div+css½Ì³Ì

    CSS3ÖеÄÊôÐÔÑ¡Ôñ·û_div+css½Ì³Ì

    2015-09-17 16:55

ÍøÓѵãÆÀ