} -->

iPhone Style, Slide To Unlock dengan Jquery dan CSS

Kepada yg tidak tahu, sebenarnya blogger mmg support coding css dan jquery. Jadi hari ini saya akan ajar cara nk buat slide to unlock seperti di sini
                                                                  in yang ada di CSS Tricks
ini yang akan kita buat sebentar nanti

Baik mari kita buat sekarang XD.

Copy CSS dibawah ni
 
#well {
padding: 140px 20px 20px 300px;
background:#000;
overflow: hidden;
width:100%;height:100%;
position:fixed;
z-index:9999999999999999;
-webkit-user-select: none;
font-family: 'Open Sans', sans-serif;
}

#well h2 {
background: -moz-linear-gradient(left, #8B836F, 0.4, #8B836F, 0.5, #52CFD2, 0.6, #8B836F, #8B836F);
background: -webkit-gradient(linear,left top,right top,color-stop(0, #8B836F),color-stop(0.4, #8B836F),color-stop(0.5, #52CFD2),color-stop(0.6, #8B836F),color-stop(1, #8B836F));
-moz-background-clip: text;
-webkit-background-clip: text;
border-radius: 15px;
-moz-text-fill-color: transparent;
-webkit-text-fill-color: transparent;
-webkit-animation: slidetounlock 5s infinite;
border: 1px solid #FEA21D;
font-size: 80px;
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
margin-top: 130px;
padding: 0;
width: 720px;
-webkit-text-size-adjust: none;
}
#slider {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtFUFA8N9Pqc2MNJI_P3sEZHSyzWSZsbHugI3Wgd9m-th5LbWaR0pe6075N0iUoq25jC_l2ipTQEyt-kuuv4z3ypuMbw5eaBYH5FyTVDkdewdCR7HAMR53kZgvV8YhN431ltY7qDaEjw/s1600/arrow.png) no-repeat;
width: 146px;
height: 98px;
display: inline-block;
vertical-align: middle;
line-height: 1;
opacity:0.8;
}
#slider:hover {opacity:1;}

@-webkit-keyframes slidetounlock {
0% {
background-position: -720px 0;
}
100%{
background-position: 720px 0;
}
}

.bgslide {background:#000;width: 722px;
border-radius: 15p
x;}

dan letak di atas kode ]]></b:skin>

Copy Jquery dibawah ini pula

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js'/>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js'/>
<script src='http://css-tricks.com/examples/SlideToUnlock/js/slidetounlock.js'/>
 
dan letak di atas kode </head>

Copy HTML dibawah ni

<div id='well'>
<div class='bgslide'><h2><strong id='slider'/> <span>slide to unlock</span></h2></div></div>

dan letak di bawah kode <body>

dah siap pon kalo ader kesilapan atau x jadi komen sahaja di bawah ini 

Semoga Berjaya!

 

No comments:

Post a Comment

Please click

Radio By SinarFM

SinarFM Musik Retro Terbaik!

Post View

Traffic Widget

- Copyright © 2013 HSO -Hackers Studio- Powered by Blogger - Designed by Aimran Asyraf -