Q:

کد تایپ متن کنار صفحه

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

 

لطفا اگه دارید استفاده میکنید نظرتون رو بنویسید.

کد:

کد:

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

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

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

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

<style>

a.textstyle {

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

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

font-size:20pt; /* 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:#CCCCCC; /* You may change it */

}

/* 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 */

.boxstyle {

background-color:#668811;/* 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(90deg) translate(0px); /* Set rotate(-90deg) to change typing from bottom to top */

-webkit-transform: scale(1) rotate(90deg) translate(0px); /* Set rotate(-90deg) to change typing from bottom to top */

-o-transform: scale(1) rotate(90deg) translate(0px); /* Set rotate(-90deg) to change typing from bottom to top */

filter: /* Do not change */

progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=6.123233995736766e-17, M12=-1,M21=1, M22=6.123233995736766e-17),

/* Set M12=1,M21=-1 to change typing from bottom to top */

-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=6.123233995736766e-17, M12=-1, M21=1, M22=6.123233995736766e-17, sizingMethod='auto expand')"

/* Set M12=1,M21=-1 to change typing from bottom to top */

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

/* 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;

}

</style>

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

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

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

<script>

// CREDITS:

// Vertical text 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

// IMPORTANT:

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

// you have to add a highly visible link to

// http://www.fabulant.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]="لینک"

textlink[1]="لینک"

textlink[2]="لینک"

// Add the target of the link

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

texttarget[0]="_blank"

texttarget[1]="_self"

texttarget[2]="_parent"

// width and height of ticker (pixels)

var textwidth=580

var textheight=54

// pause between the messages (seconds)

var textpause=2

// 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=7

// speed (higher=slower)

var speed=80

// set the position of the ticker. Acceptable values are "rightposition" or "leftposition" or "myposition"

// "rightposition" places the ticker into the top-corner on the right

// "leftposition" places the ticker into the top-corner on the left

// "myposition" sets the the horizontal (x_position) and vertical (y_position) position to your needs

var tickerposition="rightposition"

// if you set "myposition" you should enter the x_position amd y_position below (pixels)

var x_position=800

var y_position=140

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

// 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=true

var okbr=true

var agt=navigator.userAgent.toLowerCase();

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="<a href='"+textlink[i_text]+"' target='"+texttarget[i_text]+"' class='textstyle'>"

textcontent+=textpresubstring

textcontent+="</a>"

}

}

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 (!document.all) {

textwidth-=(2*textborder+2*textpadding)

textheight-=(2*textborder+2*textpadding)

if (tickerposition=="rightposition") {

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

document.write('</div>')

}

else if (tickerposition=="leftposition") {

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

document.write('</div>')

}

else if (tickerposition=="myposition") {

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

document.write('</div>')

}

window.onload=showticker

}

else if (document.all) {

textwidth-=(2*textborder+2*textpadding)

textheight-=(2*textborder+2*textpadding)

if (tickerposition=="rightposition") {

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

document.write('</div>')

}

else if (tickerposition=="leftposition") {

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

document.write('</div>')

}

else if (tickerposition=="myposition") {

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

document.write('</div>')

}

window.onload=showticker

}

</script>

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

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

خیلی حال کردم با کدات

ممنون از کدت

موفق باشی

این کد هم سی اس اس 3 هست که این یکی داخل اینترنت اکسپلورر کلا نشون داده نمیشه...

ولی جالبه.

سلام نمیشه کاری کرد که شناور باشه

یعنی میای پایین صفحه اونم بیاد

اگه میشه کدش رو بذار دمت گرم

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

کد 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
ارسال تیکت