مخصوص متن های متحرک برای چت روم

مخصوص متن های متحرک برای چت روم
http://www.uplooder.net/img/image/66/4ee9a8b8d8d18e6c2c496da2df602e98/Screen_Shot_2014-08-07_at_13.55.07.png
به ادامه مطلب بروید


 

http://www.uplooder.net/img/image/66/4ee9a8b8d8d18e6c2c496da2df602e98/Screen_Shot_2014-08-07_at_13.55.07.png


کد PHP:
<marquee 
scrollamount
="1" 
scrolldelay="20" 
style="border:1px solid #FF0000;
font-family:        Tahoma;
font-size: 10pt;
color: #FF0000"        
direction="right">
TEXT
</marquee> 

در كد بالا به جاي عبارات 1px و #FF0000 به ترتيب سايز خط و رنگ خط را مشخص كنيد.
کد را حتما قبل از تگ body/ قرار بدید

کد شماره2
کد متن متحرک به صورت تایپی

کد PHP:
    <div id="tickerAnchor" dir="rtl" align="center"></div><script language="JavaScript" type="text/javascript">
<!--
// Ticker startup
function startTicker()
{
    
// Define run time values
    
theCurrentStory     = -1;
    
theCurrentLength    = 0;
    
// Locate base objects
    
if (document.getElementById) {    
            
theAnchorObject     = document.getElementById("tickerAnchor");
            
runTheTicker();       
         }
    else {
            
document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}</style>");
            return 
true;
    }
}
// Ticker main run loop
function runTheTicker()
{
    var 
myTimeout;  
    
// Go for the next story data block
    
if(theCurrentLength == 0)
    {
        
theCurrentStory++;
        
theCurrentStory      = theCurrentStory % theItemCount;
        
theStorySummary      = theSummaries[theCurrentStory].replace(/"/g,'"');        
        theTargetLink        = theSiteLinks[theCurrentStory];
        theAnchorObject.href = theTargetLink;
        thePrefix          = "<span class=\"tickls\">" + theLeadString + "</span>";
    }
    // Stuff the current ticker text into the anchor
    theAnchorObject.innerHTML = thePrefix + 
    theStorySummary.substring(0,theCurrentLength) + whatWidget();
    // Modify the length for the substring and define the timer
    if(theCurrentLength != theStorySummary.length)
    {
        theCurrentLength++;
        myTimeout = theCharacterTimeout;
    }
    else
    {
        theCurrentLength = 0;
        myTimeout = theStoryTimeout;
    }
    // Call up the next cycle of the ticker
    setTimeout("runTheTicker()", myTimeout);
    
}
// Widget generator
function whatWidget()
{
    if(theCurrentLength == theStorySummary.length)
    {
        return theWidgetNone;
    }

    if((theCurrentLength % 2) == 1)
    {
        return theWidgetOne;
    }
    else
    {
        return theWidgetTwo;
    }
}
// -->
      </script>
    

    <script language="JavaScript" type="text/javascript">
    <!--

    var theCharacterTimeout = 50;
    var theStoryTimeout     = 5000;
    var theWidgetOne        = "_";
    var theWidgetTwo        = "-";
    var theWidgetNone       = "";
    var theLeadString       = "";

    var theSummaries = new Array();
    var theSiteLinks = new Array();

    var theItemCount = 6;
    
    theSummaries[0] = "به چت ساپورت خوش آمدید.";
    theSiteLinks[0] = "";
    
    theSummaries[1] = "طراحی و امنیت چت روم خود را به ما بسپارید.";
    theSiteLinks[1] = "http://www.chatsupport.ir";
    
    theSummaries[2] = "هر جور کدی خواستین این جا هست.";
    theSiteLinks[2] = "http://www.chatsupport.ir";
    
    theSummaries[3] = "ترفند های جالب و چیز هایی که تا به حال حتی بهش فکر هم نکرده اید.";
    theSiteLinks[3] = "http://www.chatsupport.ir";
    
    theSummaries[4] = "انجمن آموزش و پشتیبانی رایگان چت روم .";
    theSiteLinks[4] = "http://www.chatsupport.ir";
    
    theSummaries[5] = "و از همه مهم تر رفع مشکل های چت روم به طور کامل و سریع";
    theSiteLinks[5] = "http://www.chatsupport.ir";




    startTicker();
    //-->
      </script> 

افزودن به علاقه‌مندی‌ها حذف از علاقه‌مندی
  • 08 شهریور 1393
  • 1 دیدگاه
  • 7769 بازدید
اشتراک گذاری

سایر پست ها

دیدگاه ها

دوشنبه 08 دی 1404
سلام داداش این قالب برای وردپرس یا وبلاگ اینا هم کار میکنه عایا؟

اشتراک‌گذاری

ورود کاربران

خوش آمدید! لطفا وارد حساب خود شوید

رمز عبور را فراموش کرده‌اید؟
حساب کاربری ندارید؟

فراموشی رمز عبور

نام کاربری یا ایمیل خود را وارد کنید

یا

ثبت نام کاربران

در چند ثانیه حساب کاربری خود را بسازید

قبلا ثبت نام کرده‌اید؟

نظرات کاربران

دیدگاه خود را با ما در میان بگذارید