전에 사이트제작할때 사용했던 소스입니다. > 퍼블리셔팁

퍼블리셔팁

퍼블리싱과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.

전에 사이트제작할때 사용했던 소스입니다. 정보

HTML 전에 사이트제작할때 사용했던 소스입니다.

본문

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<title>새 페이지 1</title>
<style>
BODY{
scrollbar-face-color:#999999;
scrollbar-shadow-color:#FFFFFF;
scrollbar-highlight-color:#FFFFFF;
scrollbar-3dlight-color:#999999;
scrollbar-darkshadow-color:#999999;
scrollbar-track-color:#EEEEEE;
scrollbar-arrow-color:#FFFFFF;
}

td {font-family: "Verdana", "Arial", "Helvetica", "sans-serif", "돋움";font-size: 12px;color: #666666; line-height:16px;}

a:link {color:#515151; text-decoration: none; font-family: "돋움"; font-size: 12px}

a:visited {color:#515151; text-decoration: none; font-family: "돋움"; font-size: 12px}

a:hover {color:#515151; text-decoration: underline; font-family: "돋움"; font-size: 12px}

 

.news {color: 333333; font-size: 12px; font-weight:bold;}
.news02 {color: 7d7d7d; font-size: 12px;}
.pop {color: 666666; font-size: 12px}

.live1 {color: c3f9f3; font-size: 12px; line-height:14px;}
.live2 {color: ffffff; font-size: 12px; line-height:14px;}
.greeting {color: ffffff; font-size: 11px; line-height:14px;}

.food01 {color:447805; font-size: 12px; line-height:14px;}
.food02 {color:447805; font-size: 11px; line-height:14px;}

.blue {color: 0042ff; font-size: 12px;}
.white_sm {color: ffffff; font-size: 11px;}
.price {color: ff6600; font-size: 12px; font-weight:bold;}
.price02 {color: e70000; font-size: 12px; font-weight:bold;}
.price03 {color: 006cff; font-size: 12px; font-weight:bold;}
.price04 {color: 005784; font-size: 12px; font-weight:bold;}

.detail01 {color: 626262; font-size: 11px;line-height:17px;}
.detail02 {color: 0074d7; font-size: 11px;line-height:17px;}

.select  {
 background-color:ffffff;
 color:c7c7c7;
    height="18" ;
 font-size: 10pt;
 color: 676767;
 font-family: 돋움;
 border-top-style: solid;
 border-right-style: solid;
 border-bottom-style: solid;
 border-left-style: solid;
 border-top-color: e0e0e0;
 border-right-color: e0e0e0;
 border-bottom-color: e0e0e0;
 border-left-color: e0e0e0;
 border-top-width: 1px;
 border-right-width: 1px;
 border-bottom-width: 1px;
 border-left-width: 1px;

}

.select2  {
 background-color:ffffff;
 color:c7c7c7;
    height="17" ;
 font-size: 8pt;
 color: 676767;
 font-family: 돋움;
 border-top-style: solid;
 border-right-style: solid;
 border-bottom-style: solid;
 border-left-style: solid;
 border-top-color: dddddd;
 border-right-color: dddddd;
 border-bottom-color: dddddd;
 border-left-color: dddddd;
 border-top-width: 1px;
 border-right-width: 1px;
 border-bottom-width: 1px;
 border-left-width: 1px;

}
</style>
</head>

<body topmargin="0" leftmargin="0" bgcolor='#081935' oncontextmenu="return false" ondragstart="return false" onselectstart="return false">
<SCRIPT language="Javascript1.2">
<!--
    // 기본정의
    TextSlider = function(className)
    {
        document.write("<div id='TextSliderPLayer_"+ className +"'><div id='TextSliderLayer_"+ className +"'></div></div>");
        this.item       = [];
        this.width      = this.height = this.speed = this.pixel = this.interval =
        this.size       = this.moveCount = this.X = this.Y = 0;
        this.direction  = "";
        this.pLayer     = document.getElementById("TextSliderPLayer_"+ className);
        this.layer      = document.getElementById("TextSliderLayer_"+ className);
        this.align      = "left";
        this.intervalId = null;
        this.className  = className;
        this.isPause    = false;
    }

    // 활성화
    TextSlider.prototype.init = function()
    {
        with (this.pLayer.style)
        {
            width       = this.width+"px";
            height      = this.height+"px";
            overflow    = "hidden";
        }

        with (this.layer.style)
        {
            width       = this.direction=='up' || this.direction=='down' ? this.width+"px" : this.size*(this.item.length+1)+"px";
            height      = this.direction=='up' || this.direction=='down' ? this.size*(this.item.length+1)+"px" : this.height+"px";
            top         = 0;
            left        = 0;

            position    = "relative";
        }

        for (var i=0; i<parseInt(this.height / this.size, 10)+1; i++)
            this.item[this.item.length] = this.item[i];

        switch (this.direction)
        {
            case "up":      this.X = this.Y = 0; break;
            case "down":    this.X = 0; this.layer.style.top = this.Y = -this.size*(this.item.length-parseInt(5)); break;
            case "left":    this.X = this.Y = 0; break;
            case "right":   this.Y = 0; this.layer.style.left = this.X = -this.width*(this.item.length-1); break;
        }

        var __html = "<div onmouseover='"+this.className+".pause()' onmouseout='"+this.className+".unpause()'>";

        if (this.direction=='up' || this.direction=='down')
        {
            __html += "<table width='"+ this.layer.style.width +"' cellspacing='0' cellpadding='0' border='0'>";
            for (var i in this.item)
                __html += "<tr><td height='"+this.size+"' style='overflow:hidden' align='"+this.align+"' valign='middle'>"+this.item[i]+"</td></tr>";
            __html += "</table>";
        }
        else
        {
            __html += "<table cellspacing='0' cellpadding='0' border='0'><tr>";
            for (var i in this.item)
                __html += "<td width='"+this.size+"' height='"+ this.layer.style.height +"' align='"+this.align+"' \
                    valign='middle' style='overflow:hidden;'>"+this.item[i]+"</td>";
            __html += "</tr></table>";
        }
        __html += "</div>";
        this.layer.innerHTML = __html;

        setTimeout(this.className+".start()", 1000); // 시작후 멈추는 시간
    }

    // 액션 Start
    TextSlider.prototype.start = function()
    {
        this.intervalId = setInterval(this.className+".move()", this.speed);
    }

    // 좌표이동
    TextSlider.prototype.move = function()
    {
        if (this.isPause) return;
        switch (this.direction)
        {
            case "up":      this.Y -= this.pixel; break;
            case "down":    this.Y += this.pixel; break;
            case "left":    this.X -= this.pixel; break;
            case "right":   this.X += this.pixel; break;
        }

        if (this.direction=='up' || this.direction=='down')
        {
            if (Math.abs(this.Y)%this.size==0) this.stop();
            this.layer.style.top = this.Y;
        }
        else
        {
            if (Math.abs(this.X)%parseInt(100)==0) this.stop();
            this.layer.style.left = this.X;
        }
    }

    // direction에 따라 Stop/좌표지정
    TextSlider.prototype.stop = function()
    {
        clearInterval(this.intervalId);

        switch (this.direction)
        {
            case "up":
                if (Math.abs(this.Y) >= parseInt(this.layer.style.height,10)-this.size) this.Y = this.layer.style.top = 0;
                break;

            case "down":
                if (Math.abs(this.Y) <= 0) this.Y = this.layer.style.top = -this.size*(this.item.length-parseInt(5))
                break;

            case "left":
                if (Math.abs(this.X) >= parseInt(100)*parseInt(34)) this.X = this.layer.style.left = 0;
                break;

            case "right":
                if (Math.abs(this.X) <= 0) this.X = this.layer.style.left = -this.width*(this.item.length-1);
                break;
        }

        setTimeout(this.className+".start()", this.interval);
    }

    // Pause : Unpause
    TextSlider.prototype.pause = function() {this.isPause = true;}
    TextSlider.prototype.unpause = function() {this.isPause = false;}

    // 기본설정
    var PM1         = new TextSlider('PM1');    // 클래스 명을 인자로 넘긴다.
    PM1.width       = 450;      // Ticker의 가로길이
    PM1.height      = 15;      // Ticker의 세로길이
    PM1.speed       = 20;                       // text가 slide되는 빠르기. 단위는 ms
    PM1.pixel       = 5;                        // text가 한번 slide할 때 움직일 픽셀.
    PM1.interval    = 4000;                     // text가 slide된 후 다음 text가 slide되기 까지의 대기시간
    PM1.size        = 15;                       // text간의 간격. height와 같거나 크게 하여야 제대로 보인다.
    PM1.direction   = 'up';      // text가 slide될 방향


  PM1.item[0]  = "<div style='width:450px;height:15px;overflow:hidden'>";
  PM1.item[0] += "<table width='100%' border='0' cellspacing='0' cellpadding='0' align='left' bgcolor='#081935'>";
  PM1.item[0] += "<tr><td style='padding:0 0 0 0;'>";
  PM1.item[0] += "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
  PM1.item[0] += "<tr><td height='15' class='txtad_txt2'>";
  PM1.item[0] += "<span>            <font color='#ffffff'> 무도코리아</font></span>";
  PM1.item[0] += "</td></tr>";
  PM1.item[0] += "</table>";
  PM1.item[0] += "</td></tr></table>";
  PM1.item[0] += "</div>";

  PM1.item[1]  = "<div style='width:450px;height:15px;overflow:hidden'>";
  PM1.item[1] += "<table width='100%' border='0' cellspacing='0' cellpadding='0' align='left' bgcolor='#081935'>";
  PM1.item[1] += "<tr><td style='padding:0 0 0 0;'>";
  PM1.item[1] += "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
  PM1.item[1] += "<tr><td height='15' class='txtad_txt2'>";
  PM1.item[1] += "<span>         <font color='#ffffff'> 무술용품 초특가 할인</font></span>";
  PM1.item[1] += "</td></tr>";
  
  PM1.item[1] += "</table>";
  PM1.item[1] += "</td></tr></table>";
  PM1.item[1] += "</div>";

  PM1.item[2]  = "<div style='width:450px;height:15px;overflow:hidden'>";
  PM1.item[2] += "<table width='100%' border='0' cellspacing='0' cellpadding='0' align='left' bgcolor='#081935'>";
  PM1.item[2] += "<tr><td style='padding:0 0 0 0;'>";
  PM1.item[2] += "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
  PM1.item[2] += "<tr><td height='15' class='txtad_txt2'>";
  PM1.item[2] += "<span>               <font color='#ffffff'>격투기의 모든것</font></span>";
  PM1.item[2] += "</td></tr>";
  PM1.item[2] += "</table>";
  PM1.item[2] += "</td></tr></table>";
  PM1.item[2] += "</div>";

  PM1.item[3]  = "<div style='width:450px;height:15px;overflow:hidden'>";
  PM1.item[3] += "<table width='100%' border='0' cellspacing='0' cellpadding='0' align='left' bgcolor='#081935'>";
  PM1.item[3] += "<tr><td style='padding:0 0 0 0;'>";
  PM1.item[3] += "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
  PM1.item[3] += "<tr><td height='15' class='txtad_txt2'>";
  PM1.item[3] += "<span>               <font color='#ffffff'>킥복싱/가라데/유도/합기도</font></span>";
  PM1.item[3] += "</td></tr>";
  
  PM1.item[3] += "</table>";
  PM1.item[3] += "</td></tr></table>";
  PM1.item[3] += "</div>";
  
  PM1.item[4]  = "<div style='width:450px;height:15px;overflow:hidden'>";
  PM1.item[4] += "<table width='100%' border='0' cellspacing='0' cellpadding='0' align='left' bgcolor='#081935'>";
  PM1.item[4] += "<tr><td style='padding:0 0 0 0;'>";
  PM1.item[4] += "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
  PM1.item[4] += "<tr><td height='15' class='txtad_txt2'>";
  PM1.item[4] += "<span>               <font color='#ffffff'>http://www.moodokorea.com</font></span>";
  PM1.item[4] += "</td></tr>";
  PM1.item[4] += "</table>";
  PM1.item[4] += "</td></tr></table>";
  PM1.item[4] += "</div>";


    PM1.init(); // TextSlider의 작동을 지시한다.

//-->
</script>

</body>

</html>

[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]
추천
0
  • 복사

댓글 0개

© SIRSOFT
현재 페이지 제일 처음으로