jQuery¼¼Êõ

С½Ì³Ì£º×Ô¼º´´½¨Ò»¸öjQuery³¤ÒõÓ°²å¼þ(3)

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2017-08-19 12:02 ÎÒÒªÆÀÂÛ( )

ÓÉÓÚÕâ¸ö²å¼þÊÇ¿ÉÅäÖõģ¬¿ÉÒÔÓ¦ÓÃÓÚÈκÎͼÏñ£¬¶à¸öͼÏñÒÔ¼°²ÎÊýÖµµÄÎÞ¾¡×éºÏ£¬ÏëÏóÁ¦ÊÇÄãΨһµÄÏÞÖÆ¡£Èç¹ûÎÒÃÇindex.htmlÏñÕâÑùµ÷ÕûHTML £º html head script type=text/javascript src=https://cdnjs.cloudflare.

ÓÉÓÚÕâ¸ö²å¼þÊÇ¿ÉÅäÖõģ¬¿ÉÒÔÓ¦ÓÃÓÚÈκÎͼÏñ£¬¶à¸öͼÏñÒÔ¼°²ÎÊýÖµµÄÎÞ¾¡×éºÏ£¬ÏëÏóÁ¦ÊÇÄãΨһµÄÏÞÖÆ¡£Èç¹ûÎÒÃÇindex.htmlÏñÕâÑùµ÷ÕûHTML £º


<html>
<head>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="jquery.longshadows.js"></script>
    <script type="text/javascript" src="script.js"></script>
    <style type="text/css">
        body{
            background:rebeccapurple;
            padding: 0;
            margin:0;
        }
        .text{
            display: inline-block;
            margin-top: 50px;
            width: 400px;
        }
        h1 {
            color:white;
            font-family: sans-serif;
            font-size:46px;
        }
        p{
            color:white;
            font-size:18px;
        }
        #logo{
            vertical-align: top;
        }
    </style>
</head>
<body>
    <img src="heart.png" id="logo">
    <div class="text">
        <h1>Long Shadows jQuery Plugin</h1>
        <p>Long shadow design is a variation of flat design to which shadows are added creating the illusion of depth and resulting in a design that looks 3-dimensional.</p>
    </div>
</body>
</html>


´ËÍ⣬Èç¹ûÎÒÃÇscript.jsʹÓÃÕâЩ²ÎÊýµ÷Óòå¼þ  £º


$(document).ready(function(){
    $("img").longshadows({
        spacing:150,
        shadowOpacity:20,
        shadowAngle:160,
        shadowLength:400,
        shadowColor:'#330000'
    });
});

ÎÒÃǵõ½Õâ¸ö½á¹û£¬ÕâÊÇÍêÃÀµÄÍøÕ¾±êÌâÉè¼Æ£º



ʹÓó¤ÒõӰЧ¹ûµÄʾÀý£º

<html>
<head>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="jquery.longshadows.js"></script>
    <script type="text/javascript" src="script.js"></script>
    <style type="text/css">
         
        .text{
            display: inline-block;
            margin-top: 0px;
            margin-left: 10px;
            width: 400px;
        }
        h1 {
            font-family: sans-serif;
            font-size:36px;
            margin-top: 0;
        }
        p{
            font-size:14px;
        }
        #logo{
            vertical-align: top;
        }
 
         
    </style>
</head>
<body>
    <img style="background-color:#e37e52;" src="tutsplus.png" id="logo">
    <div class="text">
        <h1>Tuts+</h1>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
        tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
        quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
        consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
        cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
        proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    </div>    
     
</body>
</html>


Congratulations


ÄãÏÖÔÚÓÐÁË´´½¨Ò»¸öjQuery²å¼þµÄ»ù´¡£¬ËüΪÄãµÄͼ±êÌí¼ÓÁ˳¤ÒõÓ°¡£Äã¿ÉÒÔÔڴ˲å¼þÖ®ÉϹ¹½¨£¬Ê¹ÆäÊÊÓÃÓÚÎı¾£¬»ò×éºÏ¶à¸öͼÏñºÍÒõӰЧ¹û¡£


via  code.tutsplus.com


¡¡

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

Ïà¹ØÎÄÕÂ
  • jquery ×îаæ¿ò¼ÜÏÂÔØ(1.32-1.11.1-3.2.1)

    jquery ×îаæ¿ò¼ÜÏÂÔØ(1.32-1.11.1-3.2.1)

    2017-08-07 15:00

  • jquery-mobile ѧϰ±Ê¼ÇÖ®¶þ£¨±íµ¥´´½¨£©

    jquery-mobile ѧϰ±Ê¼ÇÖ®¶þ£¨±íµ¥´´½¨£©

    2017-08-04 12:06

  • Õë¶Ô¿ª·¢ÕßµÄ20¿îÒƶ¯¿ª·¢¿ò¼Ü

    Õë¶Ô¿ª·¢ÕßµÄ20¿îÒƶ¯¿ª·¢¿ò¼Ü

    2017-07-22 13:01

  • ѧjQuery,JavaScriptºÍcssÐèÒªÕÆÎÕµ½Ê²Ã´³Ì¶È?

    ѧjQuery,JavaScriptºÍcssÐèÒªÕÆÎÕµ½Ê²Ã´³Ì¶È?

    2017-07-20 17:00

ÍøÓѵãÆÀ
·