HTML5¼¼Êõ

H53DÐýת-¶ÝµØÁú¾í·ç - ¶ÝµØÁú¾í·ç

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2016-09-23 14:00 ÎÒÒªÆÀÂÛ( )

(-1)дÔÚÇ°Ãæ Ê×ÏÈͼƬÊÇÎÒ´Ó»¥ÁªÍøÉÏÏÂÔصģ¬ÏòÕâλǰ±²Ö¾´¡£ÎÒÓõÄÊÇchrome49£¬ ûÓмӲ»Í¬ä¯ÀÀÆ÷µÄǰ׺ £¬jquery3.0£¬Í¼Æ¬×ÊÔ´·ÅÔÚÁËÎҵİٶÈÔÆÅÌÉÏ (1)֪ʶԤ±¸a.ä¯ÀÀÆ÷x¡¢y¡¢zÖáµÄ¸ÅÄî ×óÊÖÊú´ú±íyÖᣬÓÒÊÖºá´ú±íxÖᣬ×óÓÒÊÖ°Ú³ÉÒ»¸öÊ®×Ö£¬zÖáÊǼ´´¹Ö±x

(-1)дÔÚÇ°Ãæ

Ê×ÏÈͼƬÊÇÎÒ´Ó»¥ÁªÍøÉÏÏÂÔصģ¬ÏòÕâλǰ±²Ö¾´¡£ÎÒÓõÄÊÇchrome49£¬Ã»ÓмӲ»Í¬ä¯ÀÀÆ÷µÄǰ׺£¬jquery3.0£¬Í¼Æ¬×ÊÔ´·ÅÔÚÁËÎҵİٶÈÔÆÅÌÉÏ

(1)֪ʶԤ±¸ a.ä¯ÀÀÆ÷x¡¢y¡¢zÖáµÄ¸ÅÄî

×óÊÖÊú´ú±íyÖᣬÓÒÊÖºá´ú±íxÖᣬ×óÓÒÊÖ°Ú³ÉÒ»¸öÊ®×Ö£¬zÖáÊǼ´´¹Ö±xÖáÒ²´¹Ö±yÖá´©¹ýx¡¢y½»µãµÄÒ»ÌõÖ±Ïß¡£

b. :nth-of-type(1)

img:nth-of-type(1)£¬ËùÓÐÓÐ×ÓÔªËØimgµÄ¸¸ÔªËصĵÚÒ»¸öimg×ÓÔªËØ

body :nth-of-type(1) µÈͬÓÚbody *:nth-of-type(1)

(2)´úÂë

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset=utf-8>

<script   type="text/javascript" src="debug-jquery-3.0.0.js"></script>

<script   type="text/javascript" src="base.js"></script>

<link href="favicon.ico" type="image/x-icon">

<title>ΪÁËÉú»î</title>

<style type="text/css">

     *

     {

           margin-top:0px;

           padding:0;

     }

     body

     {

           position:absolute;

     }

     #lol

     {

           width:530px;

           height:530px;

           position:absolute;

          

     }

     #lol img

     {

           display:block;

           position:absolute;

           border:1px #6F0000 solid;   

     }

     #lol img:nth-of-type(1)

     {

           animation: one 10s linear 3s infinite;

     }

     @keyframes one

     {

           to

           {

                 transform: rotateX(360deg);

           }

     }

     #lol img:nth-of-type(2)

     {

           animation: two 10s linear 2s infinite;

     }

     @keyframes two

     {

           to

           {

                 transform: rotateY(360deg);

           }

     }

     #lol img:nth-of-type(3)

     {

           animation: three 10s linear 1s infinite;

     }

     @keyframes three

     {

           to

           {

                 transform:rotateZ(360deg);

           }

     }

</style>

<script type="text/javascript">

     $(function()

     {

           $("#lol").centerPos();

           //ÈÃlolÔªËØˮƽ´¹Ö±¾ÓÖÐÏÔʾ£¬centerPosÊÇ×Ô¶¨Ò庯Êý

     })

$.fn.centerPos = function()

{

     var parent;

     this.each(function(index)

     {

           parent = this.parentNode;

           if(parent == document.body)

           {

                 parent = window;

           }

           var position = $(this).css("position");

           if(position == "fixed" || position=="absolute")

           {

                 $(this).css("left",($(parent).width()-this.offsetWidth)/2+"px")

¡¡

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

Ïà¹ØÎÄÕÂ
  • canvas¶ÔÏóarcº¯ÊýµÄʹÓÃ-¶ÝµØÁú¾í·ç - ¶ÝµØÁú¾í·ç

    canvas¶ÔÏóarcº¯ÊýµÄʹÓÃ-¶ÝµØÁú¾í·ç - ¶ÝµØÁú¾í·ç

    2016-09-07 15:00

  • canvas¶ÔÏóarcToº¯ÊýµÄʹÓÃ-¶ÝµØÁú¾í·ç - ¶ÝµØÁú¾í·ç

    canvas¶ÔÏóarcToº¯ÊýµÄʹÓÃ-¶ÝµØÁú¾í·ç - ¶ÝµØÁú¾í·ç

    2016-09-07 10:00

  • CSS3¼ÆÊýÆ÷µÄʹÓÃ-¶ÝµØÁú¾í·ç - ¶ÝµØÁú¾í·ç

    CSS3¼ÆÊýÆ÷µÄʹÓÃ-¶ÝµØÁú¾í·ç - ¶ÝµØÁú¾í·ç

    2016-08-19 12:00

  • css3ÖÆ×÷ÐýתÁ¢·½ÌåÏà²á - ²»»á·ÉµÄÂéȸ

    css3ÖÆ×÷ÐýתÁ¢·½ÌåÏà²á - ²»»á·ÉµÄÂéȸ

    2016-08-11 14:00

ÍøÓѵãÆÀ
¦