Q:

مجموعه کدهای جالب متحرک کردن متن ها

سلام . با وجود این که تایپک های دیگه هم زدم در باره ی جاوا script. و نسبت خوب بودن.دیگه خسته شدم و فکرکنم این آخرین ارسالیم باشه تو قسمت جاوا . به همین دلیل و کدهای مفید و کاربردی جاوا رو اینجا میزارم . البته هر کدی رو نه درضمن هر کدی بزارم حتما سعی میکنم دموی اونهم رو بزارم.

کدهای متحرک متنی + کادر

این کد در گوشه چپ وبلاگ یه کادر باز میکنه . مانند کدهای نمایش مناسبت ها (ایام عاشورا و...)

دموی این کد رو ببینید!!

کد:
<!-- BEGINNING OF THE CODE FOR THE DIAGONAL TEXT TICKER -->

<!----------------------------------------->

<!-- STYLE-CONFIGURATION STARTS HERE -->

<!----------------------------------------->

<center><style>

/* PLEASE NOTE that padding, width and height of ticker, border-width must be set within the script-code. See script code below! */

/* IMPORTANT you may change the direction of typing from bottom to top. See comments below within this style-zone */

a.textstyle {

color:#ffffff; /* You may change it */

font-family:Arial; /* You may change it */

font-size:16pt; /* You may change it */

font-weight:bold; /* You may change it */

text-decoration:none; /* You may change it */

}

a.textstyle:visited {

color:#ffffff; /* You may change it */

}

a.textstyle:hover {

color:yellow; /* You may change it */

}

.boxstyle {

background-color:#000000;/* You may change it */

border-color:#FF4500;/* You may change it */

opacity:1; /* Set the opacity for Firefox, Opera, Safari and Chrome. Values may range from 0 to 1 */

position:absolute; /* Do not change */

overflow:hidden; /* Do not change */

display: inline-block; /* Do not change */

-moz-transform: scale(1) rotate(-45deg) translate(0px); /* Do not change */

-webkit-transform: scale(1) rotate(-45deg) translate(0px); /* Do not change */

-o-transform: scale(1) rotate(-45deg) translate(0px); /* Do not change */

filter: /* Do not change */

progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', /* IE6,IE7 */ M11=0.7071067811865476, M12=0.7071067811865475, M21=-0.7071067811865475, M22=0.7071067811865476),

/* Do not change */

-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865476, M12=0.7071067811865475, M21=-0.7071067811865475, M22=0.7071067811865476, sizingMethod='auto expand')"

/* Do not change */ alpha(opacity=100); /* Set the opacity for Internet Explorer. Values may range from 0 to 100*/

}

</style>

<!----------------------------------------->

<!-- STYLE-CONFIGURATION ENDS HERE -->

<!----------------------------------------->

<script>

// CREDITS:

// Diagonal text ticker

// By Peter Gehrig

// Copyright (c) 2010-2011 Peter Gehrig. All rights reserved.

// edit code by masoud

// Permission given to use the script provided that this notice remains as is.

// IMPORTANT:

// If you add this script to a script-library or script-archive

// you have to add a highly visible link to

// where this script will be featured

var text=new Array()

var textlink=new Array()

var texttarget=new Array()

/////////////////////////////////////////////////

// SCRIPT-CONFIGURATION STARTS HERE

/////////////////////////////////////////////////

<!----------------www.20sof.r98.ir پیغام ها -------------->

// Your messages. Add as many as you like. Experienced webmasters may even embed simple HTML-tags

// Use short messages as this is a one-line-ticker

text[0]="کد حرفه ای نمایش متن"

text[1]="مختص ایام عاشورا"

text[2]="ادامه متن شما "

// Add a link for each message

// Enter "#" if you don't want to link a message (see sample below)

textlink[0]="http://www.my link 1.com"

textlink[1]="http://www.my link 2.com"

textlink[2]="http://www.my link 3.com"

<!----------------www.20sof.r98.ir پیغام ها -------------->

// Add the target of the link

// Accepted values are "_blank","_top", "_self", "_parent" or the name of any frame

texttarget[0]="_top"

texttarget[1]="_top"

texttarget[2]="_top"

// width and height of ticker (pixels)

var textwidth=350

var textheight=38

// pause between the messages (seconds)

var textpause=3

// border-width (enter 0 if you don't want to add a border)

var textborder=4

// padding of text, distance to border (pixels)

var textpadding=5

// speed (higher=slower)

var speed=40

// set the horizontal position for Firefox, Chrome, Opera

var x_position=-72

// set the vertical position for Firefox, Chrome, Opera

var y_position=82

// set the horizontal position for Internet Explorer

var x_positionIE=-46

// set the vertical position for Internet Explorer

var y_positionIE=-35

/////////////////////////////////////////////////

// SCRIPT-CONFIGURATION ENDS HERE

/////////////////////////////////////////////////

// Do not edit below this line

if (document.all) {

var marginright=document.body.clientWidth-textheight

}

else {

var marginright=window.innerWidth-textheight

}

var okbrowser=false

var okbr=false

var agt=navigator.userAgent.toLowerCase();

okbr= (agt.indexOf("opera 9") != -1 || agt.indexOf("opera/9") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 10") != -1 || agt.indexOf("opera/10") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 11") != -1 || agt.indexOf("opera/11") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 12") != -1 || agt.indexOf("opera/12") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 13") != -1 || agt.indexOf("opera/13") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 14") != -1 || agt.indexOf("opera/14") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 15") != -1 || agt.indexOf("opera/14") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 16") != -1 || agt.indexOf("opera/14") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 17") != -1 || agt.indexOf("opera/14") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 18") != -1 || agt.indexOf("opera/14") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 19") != -1 || agt.indexOf("opera/14") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 20") != -1 || agt.indexOf("opera/14") != -1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/3") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/4") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/5") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/6") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/7") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/8") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/9") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/10") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/11") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/12") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/13") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/14") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/15") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/3.6") !=-1 || agt.indexOf("firefox/.36") !=-1 || agt.indexOf("firefox/0.36") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/3.7") !=-1 || agt.indexOf("firefox/.37") !=-1 || agt.indexOf("firefox/0.37") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/3.8") !=-1 || agt.indexOf("firefox/.38") !=-1 || agt.indexOf("firefox/0.38") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/3.9") !=-1 || agt.indexOf("firefox/.39") !=-1 || agt.indexOf("firefox/0.39") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/4") !=-1 || agt.indexOf("firefox/.4") !=-1 || agt.indexOf("firefox/0.4") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/5") !=-1 || agt.indexOf("firefox/.5") !=-1 || agt.indexOf("firefox/0.5") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/6") !=-1 || agt.indexOf("firefox/.6") !=-1 || agt.indexOf("firefox/0.6") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/7") !=-1 || agt.indexOf("firefox/.7") !=-1 || agt.indexOf("firefox/0.7") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/8") !=-1 || agt.indexOf("firefox/.9") !=-1 || agt.indexOf("firefox/0.8") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/9") !=-1 || agt.indexOf("firefox/.9") !=-1 || agt.indexOf("firefox/0.9") !=-1);

if (okbr) {okbrowser=true}

okbr= ((agt.indexOf('safari')!=-1)&&(agt.indexOf('version/3')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;

if (okbr) {okbrowser=true}

okbr= ((agt.indexOf('safari')!=-1)&&(agt.indexOf('version/4')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;

if (okbr) {okbrowser=true}

okbr= ((agt.indexOf('safari')!=-1)&&(agt.indexOf('version/5')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;

if (okbr) {okbrowser=true}

okbr= ((agt.indexOf('safari')!=-1)&&(agt.indexOf('version/6')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;

if (okbr) {okbrowser=true}

okbr= ((agt.indexOf('safari')!=-1)&&(agt.indexOf('version/7')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;

if (okbr) {okbrowser=true}

okbr= ((agt.indexOf('safari')!=-1)&&(agt.indexOf('version/8')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;

if (okbr) {okbrowser=true}

okbr= ((agt.indexOf('safari')!=-1)&&(agt.indexOf('version/9')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;

if (okbr) {okbrowser=true}

var i_mes=0

var i_substring=0

var i_presubstring=0

var i_text=0

var textcontent=""

var notag=true

var textpresubstring=""

var textaftersubstring=""

textpause*=1000

var browserinfos=navigator.userAgent

var ie4=!document.getElementById&&document.all&&!browserinfos.match(/Opera/)

var ie5=document.getElementById&&document.all&&!browserinfos.match(/Opera/)

var ns6=document.getElementById&&!document.all&&!browserinfos.match(/Opera/)

var opera=browserinfos.match(/Opera/)

function gettextcontent() {

tablewidth=textwidth-2*textborder

tableheight=textheight-2*textborder

textpresubstring=text[i_text].substring(0,i_presubstring)

var i_prepre=i_presubstring-1

if (i_prepre<0) {i_prepre=0}

if (text[i_text].substring(i_prepre,i_presubstring)=="<"){notag=false}

if (text[i_text].substring(i_prepre,i_presubstring)==">"){notag=true}

if (notag) {

textcontent="<table width="+textwidth+" height="+textheight+" cellpadding="+textpadding+"><tr valign=middle><td align=center>"

textcontent+="<a href='"+textlink[i_text]+"' target='"+texttarget[i_text]+"' class='textstyle'>"

textcontent+=textpresubstring

textcontent+="</a>"

textcontent+="</td></tr></table>"

}

}

function showticker() {

if (i_substring<=text[i_text].length) {

i_substring++

i_presubstring=i_substring-1

if (i_presubstring<0) {i_presubstring=0}

gettextcontent()

document.getElementById("ticker").innerHTML=textcontent

var timer=setTimeout("showticker()", speed)

}

else {

clearTimeout(timer)

var timer=setTimeout("changetext()", textpause)

}

}

function changetext() {

i_substring=0

i_presubstring=0

i_text++

if (i_text>text.length-1) {

i_text=0

}

showticker()

}

if (okbrowser) {

document.write('<div ID="ticker" class="boxstyle" style="width:'+textwidth+'px;height:'+textheight+'px;left:'+x_position+'px;top:'+y_position+'px;border-width:'+textborder+'px;border-style:solid;">')

document.write('</div>')

window.onload=showticker

}

else if (document.all) {

document.write('<div ID="ticker" class="boxstyle" style="width:'+textwidth+'px;height:'+textheight+'px;left:'+x_positionIE+'px;top:'+y_positionIE+'px;border-width:'+textborder+'px;border-style:solid;">')

window.onload=showticker

}

</script>

<!-- END OF THE CODE FOR THE DIAGONAL TEXT TICKER -->

کدهای متحرک متنی + کادر

اینم کد دوم : متن های افکت دار در کادر صورتی

دموی این کد رو ببنید!!

کد:
<!-- BEGINNING OF THE CODE FOR THE STRETCH-TICKER -->

<!----------------------------------------->

<!-- STYLE-CONFIGURATION STARTS HERE -->

<!----------------------------------------->

<center><style>

#stage {

/* #stage should contain all style-attributes that remain unchanged during the animation */

/* Do not change the name of #stage!!! */

font-family:Arial;

font-size:16pt;

background:#FF1493;

width:300px;

text-align: center;

vertical-align:middle;

border: 4px solid #FFFFFF ;

overflow:hidden;

padding:8px;

cursor: pointer;

/* shadow for Firefox */

-moz-box-shadow: 5px 5px 5px #ffaaaa;

/* shadow for Chrome and Safari */

-webkit-box-shadow: 5px 5px 5px #ffaaaa;

/* shadow for Opera */

box-shadow: 5px 5px 5px #ffaaaa;

/* shadow for Internet Explorer */

filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='#ffaaaa');

/* rounded corners for Firefox */

-moz-border-radius-topleft: 15px;

-moz-border-radius-bottomright: 15px;

/* rounded corners for Chrome and Safari */

-webkit-border-top-left-radius: 15px;

-webkit-border-bottom-right-radius: 15px;

/* rounded corners for Opera */

border-top-left-radius: 15px;

border-bottom-right-radius: 15px;

}

/* Below are the classes describing the changes of style-attributes during the animation */

/* Each class acts like a frame in a movie */

/* You may add as many classes as you like */

/* You may name the classes as you like. In this samplae I named them a, b, c ... and so on */

/* In this sample I changed 2 attributes: the width between the letters and the color */

/* You may change other attributes. It's up to you! */

.a {

color:#696969 ;

letter-spacing:40px;

}

.b {

color:#ff2222;

letter-spacing:38px;

}

.c {

color:#ff2222;

letter-spacing:36px;

}

.d {

color:#ff3333;

letter-spacing:34px;

}

.e {

color:#ff4444;

letter-spacing:32px;

}

.f {

color:#ff5555;

letter-spacing:30px;

}

.g {

color:#ff6666;

letter-spacing:28px;

}

.h {

color:#ff7777;

letter-spacing:26px;

}

.i {

color:#ff8888;

letter-spacing:24px;

}

.k {

color:#ff9999;

letter-spacing:22px;

}

.l {

color:#ffaaaa;

letter-spacing:20px;

}

.m {

color:#ffbbbb;

letter-spacing:17px;

}

.n {

color:#ffcccc;

letter-spacing:14px;

}

.o {

color:#ffdddd;

letter-spacing:10px;

}

.p {

color:#ffeeee;

letter-spacing:5px;

}

.q {

color:#ffffff;

letter-spacing:0px;

}

</style>

<!----------------------------------------->

<!-- STYLE-CONFIGURATION ENDS HERE -->

<!----------------------------------------->

<script>

// CREDITS:

// CSS-controlled stretch ticker

// by Peter Gehrig

// Copyright (c) 2010 Peter Gehrig. All rights reserved.

// Permission given to use the script provided that this notice remains as is.

// Additional scripts can be found at http://www.fabulant.com

// 09/02/2010

// IMPORTANT:

// If you add this script to a script-library or script-archive

// you have to add a link to http://www.fabulant.com on the webpage

// where this script will be running.

// CONFIGURATION:

// Go to http://www.fabulant.com and get the original code

// with step-by-step instructions and copy-and-paste installation.

/////////////////////////////////////////////////

// SCRIPT-CONFIGURATION STARTS HERE

/////////////////////////////////////////////////

// The array 'classes_pull_together_animation' contains the 'frames' required for the pull-together-animation

// Enter the class-names. The order is up to you

// In this sample class 'a' will be played first, then class 'b', then class 'c' an so on

var classes_pull_together_animation=new Array("a","b","c","d","e","f","g","h","i","k","l","m","n","o","p","q")

//www.20soft.r98.ir // ("v", , , , , ," , , ," , ," ,"

// The array 'classes_stretch_animation' contains the 'frames' required for the stretch-animation

// Enter the class-names. The order is up to you

// In this sample class 'q' will be played first, then class 'p', then class 'n' an so on

var classes_stretch_animation=new Array("q","p","n","m","l","k","i","h","g","f","f","e","e","d","c","b","a")

// Set the messages. You may add as many messages as you like

var message=new Array()

message[0]="چه میخواهید ؟؟؟؟؟"

message[1]="سرویس وبلاگدهی قدرتمند ؟"

message[2]="پیشنهاد سرویس رزبلاگ است"

// Set a link for each message. You may add as many messages as you like

// If you don't want to add a link enter a "#" instead of the URL. See sample below

var messagelink=new Array()

messagelink[0]="https://www.rozblog.com"

messagelink[1]="https://www.rozblog.com"

messagelink[2]="https://www.rozblog.com"

// Set the speed of the animation from class to class (frame to frame). High values = slow speed

var speed=40

// Set the standstill-time of message (seconds)

var pause=2

/////////////////////////////////////////////////

// SCRIPT-CONFIGURATION ENDS HERE

/////////////////////////////////////////////////

// do not edit below this line

var i_classnames=0

var i_message=0;

var i_messagelink=0;

var tmr

pause*=1000

var spc="\&"+"nbsp;"

for (i=0;i<message.length;i++) {

message=message.replace(/[" "]/g,spc)

}

function setcontent() {

i_messagelink=i_message

if (i_message>=message.length) {

i_message=0

}

if (i_messagelink>=message.length) {

i_messagelink=0

}

document.getElementById("stage").innerHTML=message[i_message]

i_message++

i_classnames=0

pull_together()

}

function pull_together() {

if (i_classnames<=classes_pull_together_animation.length-1) {

document.getElementById("stage").className=classes_pull_together_animation[i_classnames]

i_classnames++

tmr=setTimeout("pull_together()",speed)

}

else {

clearTimeout(tmr);

i_classnames=0

setTimeout("stretch()",pause)

}

}

function stretch() {

if (i_classnames<=classes_stretch_animation.length-1) {

document.getElementById("stage").className=classes_stretch_animation[i_classnames]

i_classnames++

tmr=setTimeout("stretch()",speed)

}

else {

clearTimeout(tmr);

i_classnames=0

setTimeout("setcontent()",500)

}

}

function gotourl() {

document.location.href=messagelink[i_messagelink]

}

window.onload=setcontent

</script>

<div id="stage" onclick="gotourl()"></div>

<!-- END OF THE CODE FOR THE STRETCH-TICKER -->

اینم کد سوم: که خیلی جالب هست .

متن های متحرک رو تمام صفحه میکنه!!!!!!!

دموی این کد رو حتما اینجا ببینید!!!!!!!!!!

کد:
<script>

// CREDITS:

// Fullpage Background-Ticker 2.2 by Peter Gehrig

// Copyright (c) 2011 Peter Gehrig. All rights reserved.

// Permission given to use the script provided that this notice remains as is.

// scripts by masoud.rzb //

// IMPORTANT:

// If you add this script to a script-library or a script-archive

// will be displayed.

<!-------------20soft.r98.ir شروع متن ها ----------------->

// Set your messages. You may add as many messages as you like.

var message=new Array()

message[0]="توجه هر گونه کپی برداری از مطالب این سایت "

message[1]="پیگرد قاونی خواهد داشت"

message[2]=" بهترین و قویترین سرویس وبلاگدهی www.rozblog.com"

// Set font-family of the text

var fnt="Arial"

// Set font-size of the text (CSS-values)

var fntsize=50

// Set font-color of the text

var fntcolor="#CCCCCC"

// Set font-color of the last letter of the ticker

var fntcolorlastletter="#666666"

// Set font-weight. Set a value between 1 to 9 to adjust the boldness

var fntweight=7

// Set standstill between the messages (seconds)

var standstill=3

// Set speed (higher=slower)

var speed=80

// the top-position of the ticker (distance to the border on top, pixels)

var topposition=200

// the left-position of the ticker (distance to the border on the left, pixels)

var leftposition=20

// Do not edit the variables below

var tickerwidth

var tickerheight

var i_substring=0

var i_presubstring=0

var i_message=0

var messagecontent=""

var messagebackground=""

var messagepresubstring=""

var messageaftersubstring=""

fntweight=fntweight*100

standstill*=1000

<!-------------20soft.r98.ir شروع متن ها ----------------->

var browserinfos=navigator.userAgent

var ie4=document.all&&!document.getElementById&&!browserinfos.match(/Opera/)

var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)

var ns4=document.layers

var ns6=document.getElementById&&!document.all&&!browserinfos.match(/Opera/)

var opera=browserinfos.match(/Opera/)

var browserok=ie4||ie5||ns4||ns6||opera

for (i=0;i<=message.length-1;i++) {

message=message+" "

}

function initiateticker() {

tickerheight=document.body.clientHeight-5

tickerwidth=document.body.clientWidth-5

document.getElementById('ticker').style.left=leftposition

document.getElementById('ticker').style.top=topposition

showticker()

}

function getmessagecontent() {

messagepresubstring=message[i_message].substring(0,i_presubstring)

messageaftersubstring=message[i_message].substring(i_presubstring,i_substring)

messagecontent="<table border=0 width="+tickerwidth+" height="+tickerheight+"><tr><td valign=top>"

messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsize+"pt;font-weight:"+fntweight+"'>"

messagecontent+="<font color='"+fntcolor+"'>"

messagecontent+=messagepresubstring

messagecontent+="</font>"

messagecontent+="</span>"

messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsize+"pt;font-weight:900'>"

messagecontent+="<font color='"+fntcolorlastletter+"'>"

messagecontent+=messageaftersubstring

messagecontent+="</font>"

messagecontent+="</span>"

messagecontent+="</td></tr></table>"

}

function showticker() {

if (i_substring<=message[i_message].length-1) {

i_substring++

i_presubstring=i_substring-1

if (i_presubstring<0) {i_presubstring00}

getmessagecontent()

document.getElementById('ticker').innerHTML=messagecontent

var timer=setTimeout("showticker()", speed)

}

else {

clearTimeout(timer)

var timer=setTimeout("changemessage()", standstill)

}

}

function changemessage() {

i_substring=0

i_presubstring=0

i_message++

if (i_message>message.length-1) {

i_message=0

}

showticker()

}

if (browserok) {window.onload=initiateticker}

</script>

<DIV ID="ticker" style="position:absolute"></DIV>

<DIV ID="do_not_delete_this" style="position:relative">

| یاد آوری کنم . من اینجا به هیچ وقت بلیغ نمیکنم. و خداشاهده فقط هدفم خدمت به شماست.

4-

اینم زیباترین کد از این نوع کدها

کد بارش برف !! دوستان اشتباه نگیرد . اینبار برف نمیاد . بجاش : آقای temp98 ,و masoud و... از آسمان به صورت معلق میایم پایین . // حتما دموی این کد رو ببینید!!

دموی کد دوستان معلق در هوا

کد:
<script>

// CREDITS:

// Snowmessage

// By Peter Gehrig

// Copyright (c) 2011

// EDIT By masoud.rzb

// Permission given to use the script provided that this notice remains as is.

// IMPORTANT:

// If you add this script to a script-library or script-archive

// where this script will be featured

///////////////////////////////////////////////////////////////////////////

// CONFIGURATION STARTS HERE

///////////////////////////////////////////////////////////////////////////

//

<!---------------20soft.r98.ir رنگ ها و متن های اصلی ----------->

// Set the number of snowflakes (more than 30 - 40 not recommended)

var snowmax=32

// Set the colors for the snow. Add as many colors as you like

var snowcolor=new Array("#aaaacc","#FF1493","#FF4500","#1E90FF")

// info by masoud // color #FF1493 RED

// info by masoud // color #FF4500 Orange

// info by masoud // color #1E90FF Sky - blue

// Set the fonts, that create the snowflakes. Add as many fonts as you like

var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS","Courier")

// Set the messages

var snowmessage=new Array ("Temp98", "Rozblog", "Masoud", "Admin", "Reza", "Arsalan")

// Set the speed of sinking (recommended values range from 0.3 to 2)

var sinkspeed=0.6

// Set the maximal-size of your snowflaxes

var snowmaxsize=18

// Set the minimal-size of your snowflaxes

var snowminsize=7

// Set the snowing-zone

// Set 1 for all-over-snowing, set 2 for left-side-snowing

// Set 3 for center-snowing, set 4 for right-side-snowing

var snowingzone=3

<!---------------20soft.r98.ir رنگ ها و متن های اصلی ----------->

///////////////////////////////////////////////////////////////////////////

// CONFIGURATION ENDS HERE

///////////////////////////////////////////////////////////////////////////

// Do not edit below this line

var snow=new Array()

var marginbottom

var marginright

var timer

var i_snow=0

var i_text=0

var x_mv=new Array();

var crds=new Array();

var lftrght=new Array();

var browserinfos=navigator.userAgent

var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)

var ns6=document.getElementById&&!document.all

var opera=browserinfos.match(/Opera/)

var browserok=ie5||ns6||opera

function randommaker(range) {

rand=Math.floor(range*Math.random())

return rand

}

function initsnow() {

if (ie5 || opera) {

marginbottom = document.body.clientHeight

marginright = document.body.clientWidth

}

else if (ns6) {

marginbottom = window.innerHeight

marginright = window.innerWidth

}

var snowsizerange=snowmaxsize-snowminsize

for (i=0;i<=snowmax;i++) {

crds = 0;

lftrght = Math.random()*15;

x_mv = 0.03 + Math.random()/10;

snow=document.getElementById("s"+i)

snow.style.fontFamily=snowtype[randommaker(snowtype.length)]

snow.size=randommaker(snowsizerange)+snowminsize

snow.style.fontSize=snow.size+"pt"

snow.style.color=snowcolor[randommaker(snowcolor.length)]

snow.sink=sinkspeed*snow.size/5

if (snowingzone==1) {snow.posx=randommaker(marginright-snow.size)}

if (snowingzone==2) {snow.posx=randommaker(marginright/2-snow.size)}

if (snowingzone==3) {snow.posx=randommaker(marginright/2-snow.size)+marginright/4}

if (snowingzone==4) {snow.posx=randommaker(marginright/2-snow.size)+marginright/2}

snow.posy=randommaker(2*marginbottom-marginbottom-2*snow.size)

snow.style.left=snow.posx+"px"

snow.style.top=snow.posy+"px"

}

movesnow()

}

function movesnow() {

for (i=0;i<=snowmax;i++) {

crds += x_mv;

snow.posy+=snow.sink

snow.style.left=(snow.posx+lftrght*Math.sin(crds))+"px";

snow.style.top=snow.posy+"px"

if (snow.posy>=marginbottom-2*snow.size || parseInt(snow.style.left)>(marginright-3*lftrght)){

if (snowingzone==1) {snow.posx=randommaker(marginright-snow.size)}

if (snowingzone==2) {snow.posx=randommaker(marginright/2-snow.size)}

if (snowingzone==3) {snow.posx=randommaker(marginright/2-snow.size)+marginright/4}

if (snowingzone==4) {snow.posx=randommaker(marginright/2-snow.size)+marginright/2}

snow.posy=0

}

}

var timer=setTimeout("movesnow()",60)

}

for (i=0;i<=snowmax;i++) {

document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"px'>"+snowmessage[i_text]+"</span>")

i_text++;

if (i_text>=snowmessage.length) {

i_text=0;

}

}

if (browserok) {

window.onload=initsnow

}

</script>

بزودی چند کد دیگه هم قرار میدم.

تشکر هم فراموش نشه ! البته اجباری نیست بلکه اختیاری هست

کدهای جاوا اسکریپت
پاسخ ها

سلام واقعا دستت درد نكنه خيلي بدرد مي خوره من يه راه حل دارم براي اولين كدت كه خيلي جالبتر بشه

نميتوني كاري كني كه هر متني رو كه ميزاريم بشه جلوش لينك گذاشت

مثلا شما در كد اولي اين مطلب رو گذاشتيد

كد حرفه ايي نمايش متن

خب مثلا با كليك بر روي اين بشه به همون قسمت انتقال داده شه يعني متن ها لينك بخورن مي توني اين كارو كني؟

چرا که نمیشه .. !! اگه منظورت لینک دادن به هریک از نوشته هاست . خوب من کد رو اصلاح کردم .

اینم کد اول : اصلاح شد!!!

موارد اضافی اصلاحی : لینک دادن به هر متن + تغییرظاهر

دموی جدید این کد !!! رو اینجا ببینید!

کد:
<!-- BEGINNING OF THE CODE FOR THE DIAGONAL TEXT TICKER -->

<!----------------------------------------->

<!-- STYLE-CONFIGURATION STARTS HERE -->

<!----------------------------------------->

<style>

/* PLEASE NOTE that padding, width and height of ticker, border-width must be set

within the script-code. See script code below! */

/* IMPORTANT you may change the direction of typing from bottom to top. See

comments below within this style-zone */

a.textstyle {

color:#1E90FF ; /* You may change it */

font-family:Arial; /* You may change it */

font-size:14pt; /* You may change it */

font-weight:bold; /* You may change it */

text-decoration:none; /* You may change it */

}

a.textstyle:visited {

color:#ffffff; /* You may change it */

}

a.textstyle:hover {

color:yellow; /* You may change it */

}

.boxstyle {

background-color:#FF1493 ;/* You may change it */

border-color:#DDDDDD;/* You may change it */

opacity:1; /* Set the opacity for Firefox, Opera, Safari and Chrome. Values may

range from 0 to 1 */

position:absolute; /* Do not change */

overflow:hidden; /* Do not change */

display: inline-block; /* Do not change */

-moz-transform: scale(1) rotate(-45deg) translate(0px); /* Do not change */

-webkit-transform: scale(1) rotate(-45deg) translate(0px); /* Do not change */

-o-transform: scale(1) rotate(-45deg) translate(0px); /* Do not change */

filter: /* Do not change */

progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', /* IE6,IE7 */

M11=0.7071067811865476, M12=0.7071067811865475, M21=-0.7071067811865475,

M22=0.7071067811865476),

/* Do not change */

-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865476,

M12=0.7071067811865475, M21=-0.7071067811865475, M22=0.7071067811865476,

sizingMethod='auto expand')"

/* Do not change */ alpha(opacity=100); /* Set the opacity for Internet Explorer.

Values may range from 0 to 100*/

}

</style>

<!----------------------------------------->

<!-- STYLE-CONFIGURATION ENDS HERE -->

<!----------------------------------------->

<script>

// CREDITS:

// Diagonal text ticker

// By Peter Gehrig

// Copyright (c) 2011 Peter Gehrig. All rights reserved.

// Permission given to use the script provided that this notice remains as is.

// Edit ver to persian lang and reg by masoud.rzb

// Additional scripts can be found Powered https://www.rozblog.com

// IMPORTANT:

// If you add this script to a script-library or script-archive

// you have to add a highly visible link to

// http://www.news.rozblog.com on the webpage

// where this script will be featured

var text=new Array()

var textlink=new Array()

var texttarget=new Array()

/////////////////////////////////////////////////

// SCRIPT-CONFIGURATION STARTS HERE

/////////////////////////////////////////////////

// Your messages. Add as many as you like. Experienced webmasters may even

embed simple HTML-tags

// Use short messages as this is a one-line-ticker

text[0]="کد حرفه ای نمایش متن"

text[1]="مختص ایام عاشورا"

text[2]="ادامه متن شما "

// Add a link for each message

// Enter "#" if you don't want to link a message (see sample below)

textlink[0]="http://www.Yourlink.ir"

textlink[1]="http://www.yourlink.com"

textlink[2]="http://www.yourlink.net"

// Add the target of the link

// Accepted values are "_blank","_top", "_self", "_parent" or the name of any frame

texttarget[0]="_top"

texttarget[1]="_top"

texttarget[2]="_top"

// width and height of ticker (pixels)

var textwidth=360

var textheight=40

// pause between the messages (seconds)

var textpause=2

// border-width (enter 0 if you don't want to add a border)

var textborder=2

// padding of text, distance to border (pixels)

var textpadding=7

// speed (higher=slower)

var speed=40

// set the horizontal position for Firefox, Chrome, Opera

var x_position=-72

// set the vertical position for Firefox, Chrome, Opera

var y_position=82

// set the horizontal position for Internet Explorer

var x_positionIE=-46

// set the vertical position for Internet Explorer

var y_positionIE=-35

/////////////////////////////////////////////////

// SCRIPT-CONFIGURATION ENDS HERE

/////////////////////////////////////////////////

// Do not edit below this line

if (document.all) {

var marginright=document.body.clientWidth-textheight

}

else {

var marginright=window.innerWidth-textheight

}

var okbrowser=false

var okbr=false

var agt=navigator.userAgent.toLowerCase();

okbr= (agt.indexOf("opera 9") != -1 || agt.indexOf("opera/9") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 10") != -1 || agt.indexOf("opera/10") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 11") != -1 || agt.indexOf("opera/11") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 12") != -1 || agt.indexOf("opera/12") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 13") != -1 || agt.indexOf("opera/13") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 14") != -1 || agt.indexOf("opera/14") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 15") != -1 || agt.indexOf("opera/14") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 16") != -1 || agt.indexOf("opera/14") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 17") != -1 || agt.indexOf("opera/14") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 18") != -1 || agt.indexOf("opera/14") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 19") != -1 || agt.indexOf("opera/14") != -1);

if (okbr) {okbrowser=true}

okbr= (agt.indexOf("opera 20") != -1 || agt.indexOf("opera/14") != -1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/3") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/4") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/5") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/6") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/7") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/8") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/9") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/10") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/11") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/12") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/13") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/14") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("chrome/15") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/3.6") !=-1 || agt.indexOf("firefox/.36") !=-1 || agt.indexOf

("firefox/0.36") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/3.7") !=-1 || agt.indexOf("firefox/.37") !=-1 || agt.indexOf

("firefox/0.37") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/3.8") !=-1 || agt.indexOf("firefox/.38") !=-1 || agt.indexOf

("firefox/0.38") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/3.9") !=-1 || agt.indexOf("firefox/.39") !=-1 || agt.indexOf

("firefox/0.39") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/4") !=-1 || agt.indexOf("firefox/.4") !=-1 || agt.indexOf

("firefox/0.4") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/5") !=-1 || agt.indexOf("firefox/.5") !=-1 || agt.indexOf

("firefox/0.5") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/6") !=-1 || agt.indexOf("firefox/.6") !=-1 || agt.indexOf

("firefox/0.6") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/7") !=-1 || agt.indexOf("firefox/.7") !=-1 || agt.indexOf

("firefox/0.7") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/8") !=-1 || agt.indexOf("firefox/.9") !=-1 || agt.indexOf

("firefox/0.8") !=-1);

if (okbr) {okbrowser=true}

okbr = (agt.indexOf("firefox/9") !=-1 || agt.indexOf("firefox/.9") !=-1 || agt.indexOf

("firefox/0.9") !=-1);

if (okbr) {okbrowser=true}

okbr= ((agt.indexOf('safari')!=-1)&&(agt.indexOf('version/3')!=-1)&&(agt.indexOf

('mac')!=-1))?true:false;

if (okbr) {okbrowser=true}

okbr= ((agt.indexOf('safari')!=-1)&&(agt.indexOf('version/4')!=-1)&&(agt.indexOf

('mac')!=-1))?true:false;

if (okbr) {okbrowser=true}

okbr= ((agt.indexOf('safari')!=-1)&&(agt.indexOf('version/5')!=-1)&&(agt.indexOf

('mac')!=-1))?true:false;

if (okbr) {okbrowser=true}

okbr= ((agt.indexOf('safari')!=-1)&&(agt.indexOf('version/6')!=-1)&&(agt.indexOf

('mac')!=-1))?true:false;

if (okbr) {okbrowser=true}

okbr= ((agt.indexOf('safari')!=-1)&&(agt.indexOf('version/7')!=-1)&&(agt.indexOf

('mac')!=-1))?true:false;

if (okbr) {okbrowser=true}

okbr= ((agt.indexOf('safari')!=-1)&&(agt.indexOf('version/8')!=-1)&&(agt.indexOf

('mac')!=-1))?true:false;

if (okbr) {okbrowser=true}

okbr= ((agt.indexOf('safari')!=-1)&&(agt.indexOf('version/9')!=-1)&&(agt.indexOf

('mac')!=-1))?true:false;

if (okbr) {okbrowser=true}

var i_mes=0

var i_substring=0

var i_presubstring=0

var i_text=0

var textcontent=""

var notag=true

var textpresubstring=""

var textaftersubstring=""

textpause*=1000

var browserinfos=navigator.userAgent

var ie4=!document.getElementById&&document.all&&!browserinfos.match(/Opera/)

var ie5=document.getElementById&&document.all&&!browserinfos.match(/Opera/)

var ns6=document.getElementById&&!document.all&&!browserinfos.match(/Opera/)

var opera=browserinfos.match(/Opera/)

function gettextcontent() {

tablewidth=textwidth-2*textborder

tableheight=textheight-2*textborder

textpresubstring=text[i_text].substring(0,i_presubstring)

var i_prepre=i_presubstring-1

if (i_prepre<0) {i_prepre=0}

if (text[i_text].substring(i_prepre,i_presubstring)=="<"){notag=false}

if (text[i_text].substring(i_prepre,i_presubstring)==">"){notag=true}

if (notag) {

textcontent="<table width="+textwidth+" height="+textheight+"

cellpadding="+textpadding+"><tr valign=middle><td align=center>"

textcontent+="<a href='"+textlink[i_text]+"' target='"+texttarget

[i_text]+"' class='textstyle'>"

textcontent+=textpresubstring

textcontent+="</a>"

textcontent+="</td></tr></table>"

}

}

function showticker() {

if (i_substring<=text[i_text].length) {

i_substring++

i_presubstring=i_substring-1

if (i_presubstring<0) {i_presubstring=0}

gettextcontent()

document.getElementById("ticker").innerHTML=textcontent

var timer=setTimeout("showticker()", speed)

}

else {

clearTimeout(timer)

var timer=setTimeout("changetext()", textpause)

}

}

function changetext() {

i_substring=0

i_presubstring=0

i_text++

if (i_text>text.length-1) {

i_text=0

}

showticker()

}

if (okbrowser) {

document.write('<div ID="ticker" class="boxstyle"

style="width:'+textwidth+'px;height:'+textheight+'px;left:'+x_position+'px;top:'+y_po

sition+'px;border-width:'+textborder+'px;border-style:solid;">')

document.write('</div>')

window.onload=showticker

}

else if (document.all) {

document.write('<div ID="ticker" class="boxstyle"

style="width:'+textwidth+'px;height:'+textheight+'px;left:'+x_positionIE+'px;top:'+y_

positionIE+'px;border-width:'+textborder+'px;border-style:solid;">')

window.onload=showticker

}

</script>

<!-- END OF THE CODE FOR THE DIAGONAL TEXT TICKER -->

masoud کارت عالی بود

من تا حالا چنین کد هایی ندیده بودم

در مورد کد 4 هم یک سئوال داشتم !

میشه یک کاری کرد که اسم ها لینک داشته باشن و در یک منو در وبلاگ به عنوان تبادل لینک استفاده کرد ؟

واقعا كرات حرف نداره منم اين كد رو ميخوام ولي به عنوان لينك دوستان خيلي جالبه نميشه اين كارش كني؟كه arsaland دوست عزيزمون گفتن؟

کد شماره 5

این کد متحرک است . از هر نظر و هم میشه لینک برای قسمت مورد نظر داد.

درضمن در مورد کد نوشته های معلق بگم که متسفانه خیلی سعی کردم. با مشکلات زیادی برخورد کردم و نتونستم براشون لینک بزارم. اما اگه شد. حتما میزارم

دموی این کد رو ببینید!

کد:
<script>

// CREDITS:

// One-Line-Scroller by Peter Gehrig Script build

// Copyright (c) 2011 masoud.rzb All rights reserved.{persian lang}tran

// Permission given to use the script provided that this notice remains as is.

// IMPORTANT:

// If you add this script to a script-library or script-archive

// where this script will be running.

var message= new Array()

// Configure each message below like this:

// message[indexnumber]="text of title|text of copy|URL of link|target of link"

// You may add as many messages as you like.

message[0]="متن مورد نظر1|متن شما در اینجا شماره1 Text |http://www.user.rozblog.com|_blank"

message[1]="متن مورد نظر2|متن شما در اینجا شماره2 Text |http://www.user.rozblog.com|_top"

message[2]="متن مورد نظر3|متن شما در اینجا شماره3 Text |http://www.user.rozblog.com|_self"

// height of the scrollerbox (pixels)

var scrollerheight=30

// borderwidth of the scroller (pixels)

var scrollerborder=1

// backgroundcolor of the scroller

var scrollbg="#AAAAAA"

// font attributes of the titlezone (that contains the link)

var titlezonefont="arial"

var titlezonesize=15

var titlezonecolor="#FFFFFF ;"

var titlezonerollovercolor="red"

var titlezoneweight="bold"

var titlezonestyle="normal"

var titlezonebackgroundcolor="#00BFFF;" // رنگ کادر سمت چپ

var titlezonewidth=140

var titlezonealign="right"

// font attributes of the copyzone

var copyzonefont="arial"

var copyzonesize=16

var copyzonecolor="#FF1493;"

var copyzoneweight="normal"

var copyzonestyle="normal"

var copyzonebackgroundcolor="#696969;" // رنگ کادر سمت راست

var copyzonewidth=360

var copyzonealign="right"

// standstill between the messages (milliseconds)

var standstill=4000

// Do not edit below this line

var scrollertop=1 // time مدت زمان مقدار

var scrollerleft=1 // time مدت زمان مقدار

var cliptop=0

var clipbottom=0

var clipleft=0

var clipright=titlezonewidth+copyzonewidth

var i_message=0

var mes_joined

var mes_split

var contenttext

var contentbg=""

var step=1

var pause=16

function initiate() {

mes_joined=message[i_message]

mes_split=mes_joined.split("|")

contenttext="<table cellpadding=6 cellspacing=0 border=0>"

contenttext+="<tr valign=top>"

contenttext+="<td class='titlezone'>"

contenttext+="<a href='"+mes_split[2]+"' class='titlezone' target='"+mes_split[3]+"'>"

contenttext+=mes_split[0]

contenttext+="</a></td>"

contenttext+="<td class='copyzone'>"

contenttext+=mes_split[1]

contenttext+="</td></tr>"

contenttext+="</table>"

scrollertext.innerHTML=contenttext

document.getElementById('scrollertext').style.top=scrollertop+scrollerheight

document.getElementById('scrollertext').style.left=scrollerleft

document.getElementById('scrollertext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"

scrollin()

}

function scrollin(){

if (parseInt(document.getElementById('scrollertext').style.top)>scrollertop) {

clipbottom+=step

document.getElementById('scrollertext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"

document.getElementById('scrollertext').style.top=parseInt(document.getElementById('scrollertext').style.top)-step

var timer=setTimeout("scrollin()",pause)

}

else {

clearTimeout(timer)

var timer=setTimeout("scrollout()",standstill)

}

}

function scrollout(){

if (parseInt(document.getElementById('scrollertext').style.top)>(scrollertop-scrollerheight)) {

cliptop+=step

document.getElementById('scrollertext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"

document.getElementById('scrollertext').style.top=parseInt(document.getElementById('scrollertext').style.top)-step

var timer=setTimeout("scrollout()",pause)

}

else {

clearTimeout(timer)

changemessage()

}

}

function changemessage(){

i_message++

if (i_message>message.length-1) {i_message=0}

mes_joined=message[i_message]

mes_split=mes_joined.split("|")

cliptop=0

clipbottom=0

contenttext="<table cellpadding=4 cellspacing=0 border=0>"

contenttext+="<tr valign=top>"

contenttext+="<td class='titlezone'>"

contenttext+="<a href='"+mes_split[2]+"' class='titlezone' target='"+mes_split[3]+"'>"

contenttext+=mes_split[0]

contenttext+="</a></td>"

contenttext+="<td class='copyzone'>"

contenttext+=mes_split[1]

contenttext+="</td></tr>"

contenttext+="</table>"

scrollertext.innerHTML=contenttext

document.getElementById('scrollertext').style.top=scrollertop+scrollerheight

document.getElementById('scrollertext').style.left=scrollerleft

document.getElementById('scrollertext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"

scrollin()

}

document.write('<style>')

document.write('.titlezone {')

document.write('font-family:'+titlezonefont+';')

document.write('font-size:'+titlezonesize+';')

document.write('color:'+titlezonecolor+';')

document.write('font-weight:'+titlezoneweight+';')

document.write('font-style:'+titlezonestyle+';')

document.write('background-color:'+titlezonebackgroundcolor+';')

document.write('width:'+titlezonewidth+';')

document.write('height:'+scrollerheight+';')

document.write('text-align:'+titlezonealign+';')

document.write('}')

document.write('A.titlezone {')

document.write('text-decoration:none;')

document.write('color:'+titlezonecolor+';')

document.write('}')

document.write('A.titlezone:visited {')

document.write('color:'+titlezonecolor+';')

document.write('}')

document.write('A.titlezone:hover {')

document.write('text-decoration:none;')

document.write('color:'+titlezonerollovercolor+';')

document.write('}')

document.write('.copyzone {')

document.write('font-family:'+copyzonefont+';')

document.write('font-size:'+copyzonesize+';')

document.write('color:'+copyzonecolor+';')

document.write('font-weight:'+copyzoneweight+';')

document.write('font-style:'+copyzonestyle+';')

document.write('background-color:'+copyzonebackgroundcolor+';')

document.write('width:'+copyzonewidth+';')

document.write('height:'+scrollerheight+';')

document.write('text-align:'+copyzonealign+';')

document.write('}')

document.write('</style>')

if (document.all) {

document.write('<div id="roof" style="position:relative;width:'+(titlezonewidth+copyzonewidth+2*scrollerborder)+'px;height:'+(scrollerheight+2*scrollerborder)+'px;border-style:solid; border-width:'+scrollerborder+';background-color:'+scrollbg+';">')

}

else {

document.write('<div id="roof" style="position:relative;width:'+(titlezonewidth+copyzonewidth)+'px;height:'+(scrollerheight)+'px;border-style:solid; border-width:'+scrollerborder+';background-color:'+scrollbg+';">')

}

document.write('<div id="scrollertext" style="position:absolute;width:'+(titlezonewidth+copyzonewidth)+'px;height:'+scrollerheight+'px;top:-1000px"></div>')

document.write('</div>')

window.onload=initiate

</script>

تشکر هم فراموش نشه ! البته اجباری نیست بلکه اختیاری هست

کد شماره 6

این کد رو متونید برای ساخت یک منوی وسط بدرد بخوره

موارد کلید این کد :

گالری عکس + لینک داربودن هر عکس + توضیحات زیرین + افکت

دموی این کد رو اینجا ببینید!!

کد:
<center>

<style>

.textstyle {

/* style attributes for the comments below the pictures */

font-family: Comic Sans MS;

font-size: 14pt;

color:#666666;

text-align:center;

}

.imagestyle {

/* style attributes for the images */

padding:5px;

}

.boxstyle{

/* style attributes for the slideshow-box */

border-style:solid;

border-width:3px;

border-color:white;

/* shadow for Firefox */

-moz-box-shadow: 3px 3px 5px #AAAAAA;

/* shadow for Safari and Chrome */

-webkit-box-shadow: 3px 3px 5px #AAAAAA;

/* shadow for Opera */

box-shadow: 3px 3px 5px #AAAAAA;

/* background-color */

background-color:#F6F6F6;

}

<center></style>

<!-- END OF STYLE CONFIGURATION -->

<script>

// CREDITS:

// Free JavaScript Image Scroller with double-fade effect

// By Peter Gehrig - editon all by masoud

// Copyright (c) 2011 masoud.rzb. All rights reserved.

// IMPORTANT:

// If you add this script to a script-library or script-archive

// you have to add a highly visible link to

/////////////////////////////////////////////

// START OF SCRIPT CONFIGURATION

/////////////////////////////////////////////

// Set the URLs of images, the comment and links.

// Add as many pictures a you like

// Each image requires a block, as shown below:

// {

// imgurl : "// unsupported", not use

// comment : "-----",

// linkto : "unsupported",

// }, each block ends with a comma (exception: the very last block)

// Supprted

var picture= [

{

imgurl : "http://20soft.rozup.ir/amarok.png",

comment : "amarok",

linkto : "http://www.www.LINK1.COM"

}, // comma required

{

imgurl : "http://20soft.rozup.ir/find.png",

comment : "Find",

linkto : "http://www.LINK2.COM"

}, // comma required

{

imgurl : "http://20soft.rozup.ir/stumbled.png",

comment : "Stumbled.",

linkto : "http://www.LINK3.COM"

}, // comma required

{

imgurl : "http://20soft.rozup.ir/wordpress.png",

comment : "Wordpress",

linkto : "http://www.LINK4COM"

}, // comma required

{

imgurl : "http://20soft.rozup.ir/firefox.png",

comment : "Firefox",

linkto : "http://www.LINK5COM"

}, // comma required

]

// width of the visibie part of the slideshow (pixels)

var scrollerwidth=521

// height of the slideshow (pixels).

// ATTENTION: The height must include height of image plus height of text!

var scrollerheight=210

// width of the transparent zones on the left and on the right (pixels)

var transparentzone_width=40

// the color for the transpranet zone on the left and on the right

var transparentzone_color="#F6F6F6"

/////////////////////////////////////////////

// END OF SCRIPT CONFIGURATION

/////////////////////////////////////////////

// do not edit below this line

var translayerswidth=1

var translayersmax=Math.floor(transparentzone_width/translayerswidth)

var translayersleftpos=0

var translayersopacity=100

var translayersfactor=100/translayersmax

var translayerswidthall=translayersmax*translayerswidth

var allpicturewidth

var distancepictopic=0

var scrollerleft=0

var scrollertop=0

var pause=25

var step=2

var newstep=step

var clipleft,clipright,cliptop,clipbottom

var i_picture=0

var timer

var picturecontent=""

var ns4=document.layers?1:0

var ns6=document.getElementById&&!document.all?1:0

var ie=document.all?1:0

var browserinfos=navigator.userAgent

var opera=browserinfos.match(/Opera/)

var preloadedimages=new Array()

for (i=0;i<picture.length;i++){

preloadedimages=new Image()

preloadedimages.src=picture.imgurl

}

function init() {

allpicturewidth=document.getElementById('emptypicturediv').offsetWidth

document.getElementById('picturediv').style.top=scrollertop+"px"

document.getElementById('picturediv').style.left=scrollerleft+scrollerwidth+"px"

clipleft=0

clipright=0

cliptop=0

clipbottom=scrollerheight

document.getElementById('picturediv').style.clip ="rect("+cliptop+"px "+clipright+"px "+clipbottom+"px "+clipleft+"px)"

document.getElementById('picturediv').style.visibility="visible"

scrollpicture()

}

function scrollpicture() {

if (parseInt(document.getElementById('picturediv').style.left)>=scrollerleft-allpicturewidth) {

document.getElementById('picturediv').style.left=parseInt(document.getElementById('picturediv').style.left)-step+"px"

clipright+=step

if (clipright>scrollerwidth) {

clipleft+=step

}

document.getElementById('picturediv').style.clip ="rect("+cliptop+"px "+clipright+"px "+clipbottom+"px "+clipleft+"px)"

var timer=setTimeout("scrollpicture()",pause)

}

else {

resetposition()

}

}

function onmsover() {

step=0

}

function onmsout() {

step=newstep

}

function resetposition() {

allpicturewidth=document.getElementById('emptypicturediv').offsetWidth

document.getElementById('picturediv').style.left=scrollerleft+scrollerwidth+"px"

clipleft=0

clipright=0

document.getElementById('picturediv').style.clip ="rect("+cliptop+"px "+clipright+"px "+clipbottom+"px "+clipleft+"px)"

scrollpicture()

}

picturecontent=""

picturecontent+="<table cellpadding=2 cellspacing=0>"

picturecontent+="<tr>"

for (i=0;i<=picture.length-1;i++) {

picturecontent+="<td>"

picturecontent+="<a href=\""+picture.linkto+"\" onMouseOver=\"javascript:onmsover()\" onMouseOut=\"javascript:onmsout()\">"

picturecontent+="<img src=\""+picture.imgurl+"\" border=0 class='imagestyle'></a>"

picturecontent+="</td>"

}

picturecontent+="</tr>"

picturecontent+="<tr>"

for (i=0;i<=picture.length-1;i++) {

picturecontent+="<td class='textstyle'>"

picturecontent+=picture.comment

picturecontent+="</td>"

}

picturecontent+="</tr>"

picturecontent+="</tr></table>"

if (ie || ns6) {

document.write('<div class="boxstyle" style="position:relative;width:'+scrollerwidth+'px;height:'+scrollerheight+'px;overflow-x:hidden">')

document.write('<div id="picturediv" style="position:absolute;top:0px;left:0px;height:'+scrollerheight+'px;visibility:hidden;overflow-x:hidden;">'+picturecontent+'</div>')

if (ie) {

for (i=0;i<=translayersmax;i++) {

document.write('<span ID="trans'+i+'" style="position:absolute;top:0px;left:'+translayersleftpos+'px;width:'+translayerswidth+'px;height:'+scrollerheight+'px;background-color:'+transparentzone_color+';filter:alpha(opacity='+translayersopacity+');overflow:hidden"> </span>')

translayersleftpos+=translayerswidth

translayersopacity-=translayersfactor

}

translayersleftpos=scrollerwidth-translayersleftpos

for (ii=0;ii<=translayersmax;ii++) {

document.write('<span ID="trans'+ii+'" style="position:absolute;top:0px;left:'+translayersleftpos+'px;width:'+translayerswidth+'px;height:'+scrollerheight+'px;background-color:'+transparentzone_color+';filter:alpha(opacity='+translayersopacity+');overflow:hidden"> </span>')

translayersleftpos+=translayerswidth

translayersopacity+=translayersfactor

}

}

if (ns6) {

for (i=0;i<=translayersmax-1;i++) {

document.write('<span ID="transleft'+i+'" style="position:absolute;top:0px;left:'+translayersleftpos+'px;width:'+translayerswidth+'px;height:'+scrollerheight+'px;background-color:'+transparentzone_color+';opacity:'+translayersopacity/100+';overflow:hidden"> </span>')

translayersleftpos+=translayerswidth

translayersopacity-=translayersfactor

if (translayersopacity<0) {translayersopacity=0.001}

}

translayersleftpos=scrollerwidth-translayersleftpos

translayersopacity=0.001

for (i=0;i<=translayersmax-1;i++) {

document.write('<span ID="transright'+i+'" style="position:absolute;top:0px;left:'+translayersleftpos+'px;width:'+translayerswidth+'px;height:'+scrollerheight+'px;background-color:'+transparentzone_color+';opacity:'+translayersopacity/100+';"> </span>')

translayersleftpos+=translayerswidth

translayersopacity+=translayersfactor

}

}

document.write('</div>')

document.write('<div id="emptypicturediv" style="position:absolute;top:0px;left:0px;height:'+scrollerheight+'px;visibility:hidden">'+picturecontent+'</div>')

window.onload=init

}

</script>

فکر کنم بسه دیگه!!!

خیلی کد های جالبین،از بنر هم قشنگ ترند!!!!

تازه سازي پاسخ ها
پست های مرتبط

کد HTML رنگ ها

  • hamlo
  • شنبه 29 تیر 1398 - 12:03

درخواست کد تعقیر زبان سایت

چگونگی حذف چیزی در صفحه با استفاده از جی کوئری

  • mostafa
  • یکشنبه 23 تیر 1398 - 2:37

کد شیک و ساده گوگل پلاس

  • mostafa
  • جمعه 07 تیر 1398 - 3:06

کد ساعت دیجیتال فوق جالب

  • pooya-hir
  • چهارشنبه 03 مرداد 1397 - 17:37

کد کاربردی افراد انلاین

  • six-6
  • سه شنبه 26 تیر 1397 - 12:24

ابزاری جدید و کمیاب برای دوستداران رزبلاگ

  • smaeal
  • چهارشنبه 23 اسفند 1396 - 17:02

سورس های کاربردی جاوا اسکریپت

  • amireza
  • چهارشنبه 23 اسفند 1396 - 17:02

ابزار ساخت کد باز بسته کردن بلاک

  • mostafa
  • چهارشنبه 23 اسفند 1396 - 17:00

کد تازه سازی خوکار برای انجمن های رزبلاگ

  • tanhatarin
  • چهارشنبه 23 اسفند 1396 - 16:58

ابزار باز شدن وبسایت با قالب انتخابی کاربر

  • ahm
  • چهارشنبه 23 اسفند 1396 - 16:56

ابزار تغییر رنگ بکگراند قالب وبلاگ و سایت

  • mostafa
  • چهارشنبه 23 اسفند 1396 - 16:56

کد چت روم برای رز بلاگ (رایگان و جدید)

  • amireza
  • چهارشنبه 23 اسفند 1396 - 16:55

اسکریپت خبر خوان با قابلیت استایل پذیری بدون تبلیغات

  • hossein16
  • چهارشنبه 23 اسفند 1396 - 16:53

کد پخش فیلم و موسیقی در انجمن به همراه کد

  • smaeal
  • چهارشنبه 23 اسفند 1396 - 16:52

کسی که PHP بلده لطفا کنه بیاد ممنون (((تشکر)))

  • qahr
  • چهارشنبه 23 اسفند 1396 - 16:51

کدفال روزانه آوای نرماشیر

بستن کنترل u سایت

  • saeedlashh
  • چهارشنبه 23 اسفند 1396 - 16:50

كد انتقال دامينهاي رزبلاگ به دامنه شخصي

مشکل در گذاشتن کدهای جاوا اسکریپ

  • mamad037
  • چهارشنبه 23 اسفند 1396 - 16:48