::: در حال بارگیری لطفا صبر کنید :::Loading , please wait ...

انجمن کدستانMoisrex

MoisrexMoisrex.rozblog.com
زمان جاریtime : جمعه 22 تیر 1403 - 8:17 قبل از ظهر
نام کاربریusername : پسوردpassword : یاor عضویتregister | رمز عبور را فراموش کردمForgot your password?
شما در سایت ما ثبت نام نکرده اید و یا وارد اکانت کاربری خود نشده اید. از شما خواهشمند هستیم You are not log in to site. Please وارد شویدlogin یاor ثبت نام کنیدregister .
روشن و خاموش کردن چراخ سایت با HTML5
تعداد بازدیدvisits : 642
rezarafeie13 آفلاین



ارسال هاAnswers : 424
عضویتRegistration date : 27 /10 /1391
حمایت کردهThanks : 38
حمایت شدهThanked : 27
روشن و خاموش کردن چراخ سایت با HTML5

دمو:

http://gamerfa.ir/page/cheragh

کد:

کد:
<!doctype html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<title>Switch with CSS3 & HTML5 ~ Takide , The home of your graphic</title>

<meta name="description" content="iOS Switch CSS3 | SicanStudios.com">

<meta name="author" content="http://SicanStudios.com">

<meta name="viewport" content="width=device-width, initial-scale=0.55"/>

<style>

/* =================================================

CREATED (C) BY ALEX CICAN APRIL 2012

HTTP://SICANSTUDIOS.COM

================================================= */

/* the container/socket of the switch */

button {

font-family: Helvetica, Arial, sans-serif;

position: relative;

color: #cfcfcf;

font-size: 2em;

cursor: pointer;

background: rgb(239,239,239);

background: -moz-linear-gradient(top, rgba(239,239,239,1) 25%, rgba(226,226,226,1) 50%, rgba(239,239,239,1) 75%);

background: -webkit-gradient(linear, left top, left bottom, color-stop(25%,rgba(239,239,239,1)), color-stop(50%,rgba(226,226,226,1)), color-stop(75%,rgba(239,239,239,1)));

background: -webkit-linear-gradient(top, rgba(239,239,239,1) 25%,rgba(226,226,226,1) 50%,rgba(239,239,239,1) 75%);

background: -o-linear-gradient(top, rgba(239,239,239,1) 25%,rgba(226,226,226,1) 50%,rgba(239,239,239,1) 75%);

background: -ms-linear-gradient(top, rgba(239,239,239,1) 25%,rgba(226,226,226,1) 50%,rgba(239,239,239,1) 75%);

background: linear-gradient(top, rgba(239,239,239,1) 25%,rgba(226,226,226,1) 50%,rgba(239,239,239,1) 75%);

filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#efefef', endColorstr='#efefef',GradientType=0 );

width: 400px;

height: 400px;

padding: 70px 0 70px 0;

border: none;

-moz-box-shadow: 0 3px 10px 1px #894e30, 0 0 1px 2px #917760, inset 0 -6px 2px rgba(0,0,0,0.15), inset 0 5px 2px rgba(0,0,0,0.1), inset 0 12px 2px #fff;

-webkit-box-shadow: 0 3px 10px 1px #894e30, 0 0 1px 2px #917760, inset 0 -6px 2px rgba(0,0,0,0.15), inset 0 5px 2px rgba(0,0,0,0.1), inset 0 12px 2px #fff;

box-shadow: 0 3px 10px 1px #894e30, 0 0 1px 2px #917760, inset 0 -6px 2px rgba(0,0,0,0.15), inset 0 5px 2px rgba(0,0,0,0.1), inset 0 12px 2px #fff;

-moz-border-radius: 60px;

-webkit-border-radius: 60px;

border-radius: 60px;

-webkit-tap-highlight-color: rgba(0,0,0,0); /* on tap (iphone/ipad) don't grey button */

}

/* hides the dotted border around the switch (Firefox) */

button::-moz-focus-inner {

border: 0;

}

/* the 4 screws are attached to the socket (before, after) and to the span button (before, after) */

button:before, button:after, button span:before, button span:after {

content: "\00d7";

font-size: 0.5em;

font-weight: bold;

color: #999;

text-shadow: 0 1px 0 #fff;

position: absolute;

top: 25px;

left: 30px;

width: 21px;

height: 21px;

line-height: 21px;

-moz-border-radius: 60px;

-webkit-border-radius: 60px;

border-radius: 60px;

-moz-box-shadow: 0 2px 1px #fff, inset 0 1px 1px #aaa, inset 0 2px 2px #999, inset 0 8px 4px rgba(255,255,255,0.5), inset 0 0 5px rgba(0,0,0,0.1);

-webkit-box-shadow: 0 2px 1px #fff, inset 0 1px 1px #aaa, inset 0 2px 2px #999, inset 0 8px 4px rgba(255,255,255,0.5), inset 0 0 5px rgba(0,0,0,0.1);

box-shadow: 0 2px 1px #fff, inset 0 1px 1px #888, inset 0 2px 3px #999, inset 0 8px 4px rgba(255,255,255,0.7), inset 0 0 10px rgba(0,0,0,0.1);

background: -moz-linear-gradient(top, rgba(152,152,152,0) 0%, rgba(255,255,255,1) 100%);

background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(152,152,152,0)), color-stop(100%,rgba(255,255,255,1)));

background: -webkit-linear-gradient(top, rgba(152,152,152,0) 0%,rgba(255,255,255,1) 100%);

background: -o-linear-gradient(top, rgba(152,152,152,0) 0%,rgba(255,255,255,1) 100%);

background: -ms-linear-gradient(top, rgba(152,152,152,0) 0%,rgba(255,255,255,1) 100%);

background: linear-gradient(top, rgba(152,152,152,0) 0%,rgba(255,255,255,1) 100%);

filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00666666', endColorstr='#c4ffffff',GradientType=0 );

}

/* right-top screw position */

button:after {

left: auto;

right: 30px;

}

/* left-bottom screw position */

button span:before {

left: -90px;

top: 278px;

}

/* right-bottom screw position */

button span:after {

top: 278px;

left: auto;

right: -90px;

}

/* the inner socket of the switch */

button span {

width: 160px;

z-index: 1;

position: relative;

height: 250px;

display: block;

margin: 0 auto;

-moz-border-radius: 40px;

-webkit-border-radius: 40px;

border-radius: 40px;

background: #fff;

-moz-box-shadow: inset 0 0 1px 1px #ccc, inset 0 0 0 8px #ddd, inset 0 0 0 10px #888, inset 0 10px 0 10px #fff;

-webkit-box-shadow: inset 0 0 1px 1px #ccc, inset 0 0 0 8px #ddd, inset 0 0 0 10px #888, inset 0 10px 0 10px #fff;

box-shadow: inset 0 0 1px 1px #ccc, inset 0 0 0 8px #ddd, inset 0 0 0 10px #888, inset 0 10px 0 10px #fff;

}

/* positioning of the "I" on the switch. Button OFF state (gradient down) */

button span>b:first-child {

position: absolute;

text-shadow: 0 -1px 0 #666, 0 1px 0 #fff;

top: 11px;

left: 10px;

height: 70%;

width: 140px;

padding-top: 10px;

color: #ccc;

-moz-border-radius: 31px;

-webkit-border-radius: 31px;

border-radius: 31px;

background: rgb(229,229,229);

background: -moz-linear-gradient(top, rgba(229,229,229,1) 0%, rgba(255,255,255,1) 60%, rgba(255,255,255,1) 100%);

background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(229,229,229,1)), color-stop(60%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,1)));

background: -webkit-linear-gradient(top, rgba(229,229,229,1) 0%,rgba(255,255,255,1) 60%,rgba(255,255,255,1) 100%);

background: -o-linear-gradient(top, rgba(229,229,229,1) 0%,rgba(255,255,255,1) 60%,rgba(255,255,255,1) 100%);

background: -ms-linear-gradient(top, rgba(229,229,229,1) 0%,rgba(255,255,255,1) 60%,rgba(255,255,255,1) 100%);

background: linear-gradient(top, rgba(229,229,229,1) 0%,rgba(255,255,255,1) 60%,rgba(255,255,255,1) 100%);

filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e5e5e5', endColorstr='#ffffff',GradientType=0 );

-moz-box-shadow: inset 0 7px 10px rgba(0,0,0,0.07);

-webkit-box-shadow: inset 0 7px 10px rgba(0,0,0,0.07);

box-shadow: inset 0 7px 10px rgba(0,0,0,0.07);

}

/* positioning of the "O" on the switch */

button span>b:last-child {

position: absolute;

bottom: 17%;

color: #eee;

text-shadow: 0 -1px 0 #ddd, 0 1px 0 #fff;

width: 140px;

height: 18%;

left: 10px;

padding-top: 20px;

-moz-border-radius: 40px;

-webkit-border-radius: 40px;

border-radius: 40px;

background: #fff;

}

/* additional shadow under button, on top of inner container */

button span>b:last-child:before {

content: "";

position: absolute;

background: rgba(0,0,0,0.2);

top: 17px;

left: 0;

width: 140px;

height: 80px;

-moz-border-radius: 30px;

-webkit-border-radius: 35px;

border-radius: 30px;

z-index: -1;

-moz-box-shadow: inset 0 -10px 10px rgba(255,255,255,0.2), 0 15px 20px 2px rgba(0,0,0,0.2), 0 50px 30px 2px rgba(0,0,0,0.1);

-webkit-box-shadow: inset 0 -10px 10px rgba(255,255,255,0.2), 0 15px 20px 2px rgba(0,0,0,0.2), 0 50px 30px 2px rgba(0,0,0,0.1);

box-shadow: inset 0 -10px 10px rgba(255,255,255,0.2), 0 15px 20px 2px rgba(0,0,0,0.2), 0 50px 30px 2px rgba(0,0,0,0.1);

}

/* WHEN BUTTON IS OFF */

/* the inner socket of the switch */

button.off span {

-moz-box-shadow: inset 0 0 1px 1px #ccc, inset 0 0 0 8px #ddd, inset 0 0 0 10px #888, inset 0 10px 2px 1px rgba(0,0,0,0.15), inset 0 10px 6px rgba(0,0,0,0.5), inset 0 14px 14px rgba(0,0,0,0.3), inset 0 40px 0 #fff;

-webkit-box-shadow: inset 0 0 1px 1px #ccc, inset 0 0 0 8px #ddd, inset 0 0 0 10px #888, inset 0 10px 2px 1px rgba(0,0,0,0.15), inset 0 10px 6px rgba(0,0,0,0.5), inset 0 14px 14px rgba(0,0,0,0.3), inset 0 40px 0 #fff;

box-shadow: inset 0 0 1px 1px #ccc, inset 0 0 0 8px #ddd, inset 0 0 0 10px #888, inset 0 10px 2px 1px rgba(0,0,0,0.15), inset 0 10px 6px rgba(0,0,0,0.5), inset 0 14px 14px rgba(0,0,0,0.3), inset 0 40px 0 #fff;

}

/* top part of button */

button.off span>b:first-child {

color: #aaa;

top: 18%;

left: 12px;

height: 70%;

width: 136px;

padding-top: 10px;

-moz-border-radius: 35px;

-webkit-border-radius: 35px;

border-radius: 35px;

background: rgb(216,216,216);

background: -moz-linear-gradient(top, rgba(216,216,216,1) 0%, rgba(255,255,255,1) 72%);

background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(216,216,216,1)), color-stop(72%,rgba(255,255,255,1)));

background: -webkit-linear-gradient(top, rgba(216,216,216,1) 0%,rgba(255,255,255,1) 72%);

background: -o-linear-gradient(top, rgba(216,216,216,1) 0%,rgba(255,255,255,1) 72%);

background: -ms-linear-gradient(top, rgba(216,216,216,1) 0%,rgba(255,255,255,1) 72%);

background: linear-gradient(top, rgba(216,216,216,1) 0%,rgba(255,255,255,1) 72%);

filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d8d8d8', endColorstr='#ffffff',GradientType=0 );

}

/* bottom part of button */

button.off span>b:last-child {

position: absolute;

text-shadow: 0 -1px 0 #bbb, 0 1px 0 #fff;

color: #dfdfdf;

top: auto;

bottom: 7%;

left: 6%;

background: none;

}

/* hides the shadow */

button.off span>b:last-child:before {

display: none;

}

/* styles the "darkness" popup */

.dark {

display: none;

position: absolute;

top: 0%;

left: 0%;

width: 100%;

height: 110%;

background: black !important;

z-index: 1000;

-moz-opacity: 0.90;

opacity: 0.90;

filter: alpha(opacity=90);

}

/* =================================================

STYLING IS FOR THE PAGE

================================================= */

html, body {

height: 100%;

overflow: hidden;

background-attachment: fixed;

background: url('http://takide.in/wp-content/uploads/2012/05/pattern.jpg') #000;

margin: 0;

}

body {

background: -moz-radial-gradient(center, ellipse cover, rgba(237,237,237,0) 0%, rgba(61,22,9,0.63) 100%);

background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(237,237,237,0)), color-stop(100%,rgba(61,22,9,0.63)));

background: -webkit-radial-gradient(center, ellipse cover, rgba(237,237,237,0) 0%,rgba(61,22,9,0.63) 100%);

background: -o-radial-gradient(center, ellipse cover, rgba(237,237,237,0) 0%,rgba(61,22,9,0.63) 100%);

background: -ms-radial-gradient(center, ellipse cover, rgba(237,237,237,0) 0%,rgba(61,22,9,0.63) 100%);

background: radial-gradient(center, ellipse cover, rgba(237,237,237,0) 0%,rgba(61,22,9,0.63) 100%);

filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ededed', endColorstr='#a13d1609',GradientType=1 );

text-align: center;

padding-top: 10%;

}

footer {

font-size: 12px;

font-weight: bold;

font-family: Helvetica, Arial, sans-serif;

line-height: 1.6em;

margin-top: 2%;

color: #4b3324;

text-shadow: 0 1px 0 #dab59c;

filter: alpha(opacity=60);

-moz-opacity: 0.6;

-khtml-opacity: 0.6;

opacity: 0.6;

-moz-transition: all 0.4s;

-webkit-transition: all 0.4s;

-o-transition: all 0.4s;

transition: all 0.4s;

}

footer:hover {

filter: alpha(opacity=100);

-moz-opacity: 1;

-khtml-opacity: 1;

opacity: 1;

}

footer a:link, footer a:visited {

color: #7b1232;

text-decoration: none;

border-bottom: dotted 1px #aa214b;

}

footer a:hover {

color: #aa214b;

}

footer a:active {

top: 1px;

position: relative;

}

#enabled {

margin-bottom: 2%;

}

footer label {

vertical-align: 6%;

cursor: pointer;

}

.twitter-share-button {

vertical-align: -25%;

margin-right: -25px !important;

}

.logo {

border-bottom: none !important;

filter: alpha(opacity=30);

-moz-opacity: 0.3;

-khtml-opacity: 0.3;

opacity: 0.3;

padding: 15px;

display: inline-block;

}

</style>

</head>

<body>

<button>

<span>

<b>I</b> <b>O</b>

</span>

</button>

<footer>

<input type="checkbox" id="enabled" checked="checked" /> <label for="enabled">Turn OFF the lights</label><br/>

Created by <a href="http://twitter.com/sican" title="Alex Cican on Twitter">@sican</a><br/>

<br><a href="http://takide.in/"> Takide , The home of your graphic </a>

</footer>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>

<script type="text/javascript">

/* iOS re-orientation fix */

if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i)) {

var viewportmeta = document.querySelectorAll('meta[name="viewport"]')[0];

if (viewportmeta) {

viewportmeta.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0';

document.body.addEventListener('gesturestart', function() {

viewportmeta.content = 'width=device-width, minimum-scale=0.25, maximum-scale=1.6';

}, false);

}

/* iOS hides Safari address bar */

window.addEventListener("load",function() {

setTimeout(function() {

window.scrollTo(0, 1);

}, 1000);

});

}

$(document).ready(function(){

/* on button click, toggle class "OFF" for the switch */

$("button").click(function () {

$("button").toggleClass("off");

});

/* by default, darkness checkbox is checked (ON) but check anyhow */

if ($('#enabled').is(':checked')) {

darkness();

}

/* on checkbox click, check if checked or not,

call the function to initiate or remove the class of "darkness" if not */

$('#enabled').click(function() {

if ($('#enabled').is(':checked')) {

darkness();

} else {

$(".dark").remove();

}

});

function darkness() {

/* adds a div for the darkness when switch is OFF */

$('html').append('<div class="dark"></div>');

/* on button click, make darkness */

$("button").click(function () {

/* avoid bug of inverting the switch i.e. "1" = OFF, "0" = ON;

(by disabling the lights, clicking on the switch (OFF), re-enabling the lights and clicking the switch (ON) */

if ($("button").hasClass("")) {

//do nothing

} else {

$(".dark").fadeIn(800);

}

});

/* wherever on darkness is clicked, bring the light back and move the switch to ON */

$(".dark").click(function () {

$(".dark").fadeOut(2000);

$("button").removeClass();

});

}

});

</script>

</body>

</html>







دوشنبه 19 فروردین 1392 - 20:25
وب کاربرUser's blog ارسال پیامsend p.m. نقل قولReply سپاس گزارمThanks گزارشReport
ali آفلاین



ارسال‌هاAsnwers : 2769
عضویتRegistration date : 17 /9 /1391
حمایت کردهthanks : 477
حمایت شدهThanked : 485
پاسخAnswer 1 : روشن و خاموش کردن چراخ سایت با HTML5

حالا به چه درد میخوره؟

اومدم که....
باشم
شایدم نباشم...یا باشم....ول کن آقا...
البته اومده بودم که باشم که خراب شد...
دوشنبه 19 فروردین 1392 - 20:36
ارسال پیامSend p.m. نقل قولReply سپاس گزارمThanks گزارشReport
tumrus آفلاین



ارسال‌هاAsnwers : 363
عضویتRegistration date : 29 /6 /1391
حمایت کردهthanks : 22
حمایت شدهThanked : 96
پاسخAnswer 2 : روشن و خاموش کردن چراخ سایت با HTML5

زیبا هست ممنون


Y! ID : Q77R
Gmail : TumrusX@Gmail.Com
My Personal WebSite : Bahmanirad.ir
Best iOS Apps Download For Free Without Jailbreak : iiiStore.ir
دوشنبه 19 فروردین 1392 - 20:40
وب کاربرUser's blog ارسال پیامSend p.m. نقل قولReply سپاس گزارمThanks گزارشReport
hacker2013 آفلاین



ارسال‌هاAsnwers : 170
عضویتRegistration date : 16 /9 /1391
حمایت کردهthanks : 59
حمایت شدهThanked : 6
پاسخAnswer 3 : روشن و خاموش کردن چراخ سایت با HTML5

سلام.

امکان داره همین کلید را با سایز کوچکتر طراحی کرد برای گوشه قالب سایت

سه شنبه 20 فروردین 1392 - 19:59
وب کاربرUser's blog ارسال پیامSend p.m. نقل قولReply سپاس گزارمThanks گزارشReport
legend آفلاین



ارسال‌هاAsnwers : 604
عضویتRegistration date : 3 /1 /1392
حمایت کردهthanks : 750
حمایت شدهThanked : 326
پاسخAnswer 4 : روشن و خاموش کردن چراخ سایت با HTML5

راست میگه البته با حجم کم در سمت راست یا چپ درست کنین.خیلی جالب بود ممنون

|اگه یوقت از کد نویسی و برنامه نویسی خودت مغرور شدی یادت باشه بهترین برنامه نویس و گرافیست خداست و کسی هم نمیتونه ازش باگ پیدا کنه :دی(از خودم بود :دی)|
سه شنبه 20 فروردین 1392 - 20:31
ارسال پیامSend p.m. نقل قولReply سپاس گزارمThanks گزارشReport
amalian آفلاین


ارسال‌هاAsnwers : 288
عضویتRegistration date : 14 /10 /1391
حمایت کردهthanks : 234
حمایت شدهThanked : 241
پاسخAnswer 5 : روشن و خاموش کردن چراخ سایت با HTML5

عالیــــــــست عالیــــ

سه شنبه 20 فروردین 1392 - 20:39
ارسال پیامSend p.m. نقل قولReply سپاس گزارمThanks گزارشReport
hacker2013 آفلاین



ارسال‌هاAsnwers : 170
عضویتRegistration date : 16 /9 /1391
حمایت کردهthanks : 59
حمایت شدهThanked : 6
پاسخAnswer 6 : روشن و خاموش کردن چراخ سایت با HTML5

واسمون طراحی می کنی؟

سه شنبه 20 فروردین 1392 - 20:48
وب کاربرUser's blog ارسال پیامSend p.m. نقل قولReply سپاس گزارمThanks گزارشReport
rezarafeie13 آفلاین



ارسال‌هاAsnwers : 424
عضویتRegistration date : 27 /10 /1391
حمایت کردهthanks : 38
حمایت شدهThanked : 27
پاسخAnswer 7 : روشن و خاموش کردن چراخ سایت با HTML5

سلام بزارید ببینم میتونم کوچیکش کنم یانه/فکر نکنم طراحی باشه به احتمال زیاد css هست







سه شنبه 20 فروردین 1392 - 21:30
وب کاربرUser's blog ارسال پیامSend p.m. نقل قولReply سپاس گزارمThanks گزارشReport
rezarafeie13 آفلاین



ارسال‌هاAsnwers : 424
عضویتRegistration date : 27 /10 /1391
حمایت کردهthanks : 38
حمایت شدهThanked : 27
پاسخAnswer 8 : روشن و خاموش کردن چراخ سایت با HTML5

دوستان دکمه خاموش و روشن کردن این ابزار css هست و میتونید اندازشو به دلخواه تغییر بدید/نیازی به طراحی نیست







سه شنبه 20 فروردین 1392 - 21:41
وب کاربرUser's blog ارسال پیامSend p.m. نقل قولReply سپاس گزارمThanks گزارشReport



moisrex
درباره ماAbout us لینک های ماOur links کلمات کلیدیKeywords
انجمن تخصصی کدستان ، ساخته شده توسط فردی با نام مستعار Moisrex می باشد.This forum designed by a person who called Moisrex.

ایمیلE-mail : Moisrex @ Gmail.com
کدستان,انجمن کدستان,کدنویسی,انجمن پشتیبانی,فروم,رزبلاگ,آموزش کدنویسی,درخواست کد
تمامی حقوق این انجمن مربوط به همین انجمن می باشد | طراحی قالبCopyright (c) By Moisrex , All rights reserved | Desiger : Moisrex