웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
3D 메세지 나타나기...
2006.04.05 10:30
소스를 삽입하면 3D 효과로 메세지가 나타났다가 사라짐니다..
위의 소스를 페이지의 head 부분에 넣어 주시고..
아래 자바 소스를 페이지에 삽입 하여 주면 됩니다.
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
<style type="text/css">
v:* { behavior: url(#default#VML); }
</style> <!--페이지 HEAD 넣어 작성한다.-->
<script type="text/javascript">
/***********************************************
* 3D Spinning Message Script- By Copyright (c) 2003 Peter Gehrig
* Website: http://www.24fun.com
* Script available at/modified by Dynamic Drive (http://www.dynamicdrive.com)
* This notice must stay intact for use
***********************************************/
// Add as many messages as you like
var message=new Array("안녕하세요", "홈페이지 방문을 환영합니다.", "언제나 함께 하시길..", "Enjoy")
// Set the outline-color. Add as many colors as you like
var outlinecolor=new Array("black", "black")
// Set fillcolors 1. Add as many colors as you like
var fillcolor1=new Array("gray", "green", "white", "green")
// Set fillcolors 2. Add as many colors as you like
var fillcolor2=new Array("blue", "olive", "black", "lime")
// Set the letter marking the circle
var circlemark=new Array("-")
// Set the width of the outline
var strkweight=2
// Set the waiting time between the messages (seconds)
var pause=2
// Set the strength of the opacity (transparency of letters)
var strengthopacity="60%"
// Set the size of the circle (values range from 0.1 to 1)
var circlesize=0.5
// Always keep messages in view even if page is scrolled? (DD added option)
var keepinview="yes"
// Do not edit below this line
mytruebody=(!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body //Dynamicdrive added object
var outerwidth=mytruebody.clientWidth
var outerheight=mytruebody.clientHeight
var innerwidth=Math.floor(circlesize*outerwidth)
var innerheight=Math.floor(circlesize*outerheight)
var posleft=(outerwidth-innerwidth)/2
var postop=(outerheight-innerheight)/2
var path=new Array()
var i_message=0
var i_outlinecolor=0
var i_fillcolor1=0
var i_fillcolor2=0
var i_messagelength=0
var longestmessage=0
pause*=1000
var ie=document.getElementById&&document.all?1:0
for (i=0;i<=message.length-1;i++) {
if (message[i].length>longestmessage) {
longestmessage=message[i].length
}
longestmessage+=4
}
for (i=0;i<=message.length-1;i++) {
var emptyspace=""
var i_emptyspace=(longestmessage-message[i].length)/2
for (ii=0;ii<=i_emptyspace;ii++) {
emptyspace+=circlemark
}
message[i]=emptyspace+" "+message[i]+" "+emptyspace
}
function changeform() {
if (keepinview=="yes") //DD added
document.getElementById("roofid").style.top=mytruebody.scrollTop //DD added
if (i_outlinecolor >= outlinecolor.length) {i_outlinecolor=0}
if (i_fillcolor1 >= fillcolor1.length) {i_fillcolor1=0}
if (i_fillcolor2 >= fillcolor2.length) {i_fillcolor2=0}
document.getElementById('strokeid').color=outlinecolor[i_outlinecolor]
document.getElementById('fillid').color=fillcolor1[i_fillcolor1]
document.getElementById('fillid').color2=fillcolor2[i_fillcolor2]
if (i_message < message.length) {tick()}
else {document.getElementById('textpathid').string=""
document.getElementById("roofid").style.display="none" //DD added
}
}
function tick() {
if (i_messagelength <= message[i_message].length) {
var messagestringend=""
var messagestring=message[i_message].substring(0, i_messagelength)+messagestringend
document.getElementById('textpathid').string=messagestring
var timer=setTimeout("tick()",50)
i_messagelength++
}
else {
clearTimeout(timer)
i_messagelength=0
i_message++
i_outlinecolor++
i_fillcolor1++
i_fillcolor2++
var timer=setTimeout("changeform()",pause)
}
}
if (ie) {
document.write('<div id="roofid" style="position:absolute;left:0px;top:0px;width:'+outerwidth+'px;height:'+outerheight+'px;overflow:hidden;">')
document.write('<v:oval id="tc" style="position:absolute;top:'+postop+'px;left:'+posleft+'px;width:'+innerwidth+'px;height:'+ '+innerheight+'px">')
document.write('<v:shadow on="t" opacity="'+strengthopacity+'"/>')
document.write('<v:stroke id="strokeid" weight="'+strkweight+'pt" color="blue"/>')
document.write('<v:fill id="fillid" on="True" color="'+fillcolor1[0]+'" color2="'+fillcolor2[0]+'" opacity="'+strengthopacity+'" opacity2="'+strengthopacity+'" type="gradient"/>')
document.write('<v:path textpathok="t"/>')
document.write('<v:textpath id="textpathid" on="t" id="mytp" style="font-family:'Arial Black'; " fitpath="t" string=""/>')
document.write('</v:oval></div>')
if (window.attachEvent) //DD added code
window.attachEvent("onload", changeform) //DD added code
else
window.onload=changeform
}
</script>
..[출처;http://www.dynamicdrive.com]
위의 소스를 페이지의 head 부분에 넣어 주시고..
아래 자바 소스를 페이지에 삽입 하여 주면 됩니다.
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
<style type="text/css">
v:* { behavior: url(#default#VML); }
</style> <!--페이지 HEAD 넣어 작성한다.-->
<script type="text/javascript">
/***********************************************
* 3D Spinning Message Script- By Copyright (c) 2003 Peter Gehrig
* Website: http://www.24fun.com
* Script available at/modified by Dynamic Drive (http://www.dynamicdrive.com)
* This notice must stay intact for use
***********************************************/
// Add as many messages as you like
var message=new Array("안녕하세요", "홈페이지 방문을 환영합니다.", "언제나 함께 하시길..", "Enjoy")
// Set the outline-color. Add as many colors as you like
var outlinecolor=new Array("black", "black")
// Set fillcolors 1. Add as many colors as you like
var fillcolor1=new Array("gray", "green", "white", "green")
// Set fillcolors 2. Add as many colors as you like
var fillcolor2=new Array("blue", "olive", "black", "lime")
// Set the letter marking the circle
var circlemark=new Array("-")
// Set the width of the outline
var strkweight=2
// Set the waiting time between the messages (seconds)
var pause=2
// Set the strength of the opacity (transparency of letters)
var strengthopacity="60%"
// Set the size of the circle (values range from 0.1 to 1)
var circlesize=0.5
// Always keep messages in view even if page is scrolled? (DD added option)
var keepinview="yes"
// Do not edit below this line
mytruebody=(!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body //Dynamicdrive added object
var outerwidth=mytruebody.clientWidth
var outerheight=mytruebody.clientHeight
var innerwidth=Math.floor(circlesize*outerwidth)
var innerheight=Math.floor(circlesize*outerheight)
var posleft=(outerwidth-innerwidth)/2
var postop=(outerheight-innerheight)/2
var path=new Array()
var i_message=0
var i_outlinecolor=0
var i_fillcolor1=0
var i_fillcolor2=0
var i_messagelength=0
var longestmessage=0
pause*=1000
var ie=document.getElementById&&document.all?1:0
for (i=0;i<=message.length-1;i++) {
if (message[i].length>longestmessage) {
longestmessage=message[i].length
}
longestmessage+=4
}
for (i=0;i<=message.length-1;i++) {
var emptyspace=""
var i_emptyspace=(longestmessage-message[i].length)/2
for (ii=0;ii<=i_emptyspace;ii++) {
emptyspace+=circlemark
}
message[i]=emptyspace+" "+message[i]+" "+emptyspace
}
function changeform() {
if (keepinview=="yes") //DD added
document.getElementById("roofid").style.top=mytruebody.scrollTop //DD added
if (i_outlinecolor >= outlinecolor.length) {i_outlinecolor=0}
if (i_fillcolor1 >= fillcolor1.length) {i_fillcolor1=0}
if (i_fillcolor2 >= fillcolor2.length) {i_fillcolor2=0}
document.getElementById('strokeid').color=outlinecolor[i_outlinecolor]
document.getElementById('fillid').color=fillcolor1[i_fillcolor1]
document.getElementById('fillid').color2=fillcolor2[i_fillcolor2]
if (i_message < message.length) {tick()}
else {document.getElementById('textpathid').string=""
document.getElementById("roofid").style.display="none" //DD added
}
}
function tick() {
if (i_messagelength <= message[i_message].length) {
var messagestringend=""
var messagestring=message[i_message].substring(0, i_messagelength)+messagestringend
document.getElementById('textpathid').string=messagestring
var timer=setTimeout("tick()",50)
i_messagelength++
}
else {
clearTimeout(timer)
i_messagelength=0
i_message++
i_outlinecolor++
i_fillcolor1++
i_fillcolor2++
var timer=setTimeout("changeform()",pause)
}
}
if (ie) {
document.write('<div id="roofid" style="position:absolute;left:0px;top:0px;width:'+outerwidth+'px;height:'+outerheight+'px;overflow:hidden;">')
document.write('<v:oval id="tc" style="position:absolute;top:'+postop+'px;left:'+posleft+'px;width:'+innerwidth+'px;height:'+ '+innerheight+'px">')
document.write('<v:shadow on="t" opacity="'+strengthopacity+'"/>')
document.write('<v:stroke id="strokeid" weight="'+strkweight+'pt" color="blue"/>')
document.write('<v:fill id="fillid" on="True" color="'+fillcolor1[0]+'" color2="'+fillcolor2[0]+'" opacity="'+strengthopacity+'" opacity2="'+strengthopacity+'" type="gradient"/>')
document.write('<v:path textpathok="t"/>')
document.write('<v:textpath id="textpathid" on="t" id="mytp" style="font-family:'Arial Black'; " fitpath="t" string=""/>')
document.write('</v:oval></div>')
if (window.attachEvent) //DD added code
window.attachEvent("onload", changeform) //DD added code
else
window.onload=changeform
}
</script>
..[출처;http://www.dynamicdrive.com]
댓글 0
제목 | 글쓴이 | 날짜 |
---|---|---|
게임상의 캐릭터와 대화하는 것 같이 보이기(?) [4] | 세강 :D | 2006.02.24 |
3D 메세지 나타나기... | 왜,그러지 | 2006.04.05 |
텍스트 위에 네온 빛이 이동하는 효과.. | 왜,그러지 | 2006.04.05 |
마우스 따라다니는 아날로그 시계 [1] | 왜,그러지 | 2006.04.05 |
DHTML 계산기 | 왜,그러지 | 2006.04.05 |
홈페이지 TOP 버튼 만들어 보기 [7] | 인테리어뱅크 | 2006.04.10 |
드래그금지 태그 풀어보기 [2] | 인테리어뱅크 | 2006.04.10 |
페이지를 풀창으로 띄우는 방법 [1] | 인테리어뱅크 | 2006.04.11 |
새로운 뉴스티커 [1] | 아렌티 | 2006.04.25 |
홈페이지 하단 링크주소 없에는 소스 2 [4] | 인터니즈 | 2006.04.27 |
홈페이지 하단 링크주소 없에는 소스 [6] | 인테리어뱅크 | 2006.04.10 |
내 홈페이지에 유명사이트 검색엔진을 달자...(네이버,다음,야후 등등) [3] | 트래비스 | 2006.05.10 |
[소스] 개발자,디자이너 전용 통합검색 스크립트 [1] | 김성대 | 2006.05.19 |
깔끔한 이미지 펼침박스 [2] | ▩윤미 | 2006.07.11 |
상단 타이틀바 흐르는 텍스트 | 왜,그러지 | 2006.07.14 |
위에서 아래로 좌에서 우로... [1] | 왜,그러지 | 2006.07.14 |
배경 음악 연주기(다기능/스틱형) [1] | 이민주 | 2006.10.09 |
{로그인}관리자 로그인 폼 간단함 [2] | 김민환 | 2006.10.10 |
당신은~째 방문자 이십니다.<카운터> [11] | 김민환 | 2006.10.10 |
홈페이지의 필수!! 뮤직 플레이어!! [3] | 김민환 | 2006.10.14 |