CHINH PHỤC
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.
Đăng nhập

Ghi nhớ
Latest topics
» Tôi sẽ đỗ đại học!
by nightWalker 9/2/2024, 7:00 pm

» Kỷ niệm xưa của chúng ta
by nightWalker 9/2/2024, 6:49 pm

» Bị lệch khung cần người giúp đỡ
by webhuy28 7/10/2021, 10:34 pm

» [HỎI ĐÁP] Danh sách bạn bè không thể hiển thị
by anhdaodaica1 2/10/2021, 10:04 pm

» [HỎI ĐÁP] Thông tin tài khoản không thể lưu thay đổi
by anhdaodaica1 2/10/2021, 6:05 am

» Phim bố già full
by huy.pc52 24/8/2021, 12:20 am

» Xin code Box HTML cho Forumvi
by Larva 1/7/2021, 12:57 pm

» Hello Anh Em Chinh phục
by HoàngTửNaivip5p 28/5/2021, 5:03 am

» Trang chủ tin tức cập nhật HOT 2016
by kenbi05 1/1/2020, 11:02 pm

» Không Dang9 bài viết = hình ảnh được
by huy.pc52 30/11/2019, 10:52 am

» CHÚC ANH EM NĂM MỚI VUI VẺ TRÀNG ĐẦY HẠNH PHÚC
by sps.kủn 12/2/2019, 1:16 pm

» Skin CNTT-K3 2015 (Full Mod)[✔]
by kenbi05 6/7/2018, 12:30 am

» baivong, handsome,....
by sps.kủn 29/6/2018, 1:54 pm

» [SHARE] SKIN ĐHFM.V7 @PUNBB
by tonyhoaivu 2/5/2018, 2:37 pm

» Share Skin Xanh Dương Cùi Bắp
by tonyhoaivu 28/4/2018, 5:57 pm

» Xin Skin http://v1.hotrofm.net/
by tonyhoaivu 28/4/2018, 5:45 pm

» Xin Skin Rao Vặt
by tonyhoaivu 15/4/2018, 12:07 pm

» Làm Sao Để Xóa Khung Này
by tonyhoaivu 14/4/2018, 7:18 pm

» [Lập nhóm]Lập nhóm fm
by vietkanpy 31/3/2018, 11:53 am

» [Help] về server úp ảnh của phutu [✔]
by baivong 17/3/2018, 10:18 pm

» Đừng khóc cho “tôi – Chinh Phục!”…
by AnHung 27/2/2018, 5:33 pm

» [Share] Skin Diendandaihoc.com [ Punbb ] [✔]
by Lu Mờ 13/2/2018, 7:28 pm

» Mời mấy thím vào groups Forumotion Việt Nam.
by dang02315 13/2/2018, 12:40 am

» Có thể làm các kiểu giao diện được không?
by Lu Mờ 9/2/2018, 3:40 pm

» ltns chinhphuc.info
by Shinichi Kudo 27/1/2018, 2:27 am

Top posting users this week
No user


[Share] Hiêu ứng hoa rơi cho forum

Go down

[Share] Hiêu ứng hoa rơi cho forum Empty [Share] Hiêu ứng hoa rơi cho forum

Bài gửi by Chúa Tể Địa Ngục 18/1/2014, 12:50 pm

CÁc bạn cho code sau vào : ACP> Display> Homepage> Generalities

Code:
<script>
var pictureSrc ="http://img143.imageshack.us/img143/5785/hoamai.png"; //the location of the snowflakes
var pictureWidth = 30; //the width of the snowflakes
var pictureHeight = 30; //the height of the snowflakes
var numFlakes = 10; //the number of snowflakes
var downSpeed = 0.01; //the falling speed of snowflakes (portion of screen per 100 ms)
var lrFlakes = 10; //the speed that the snowflakes should swing from side to side


if( typeof( numFlakes ) != 'number' || Math.round( numFlakes ) != numFlakes || numFlakes < 1 ) { numFlakes = 10; }

//draw the snowflakes
for( var x = 0; x < numFlakes; x++ ) {
if( document.layers ) { //releave NS4 bug
document.write('<layer id="snFlkDiv'+x+'"><imgsrc="'+pictureSrc+'" height="'+pictureHeight+'"width="'+pictureWidth+'" alt="*" border="0"></layer>');
} else {
document.write('<div style="position:absolute;"id="snFlkDiv'+x+'"><img src="'+pictureSrc+'"height="'+pictureHeight+'" width="'+pictureWidth+'" alt="*"border="0"></div>');
}
}

//calculate initial positions (in portions of browser window size)
var xcoords = new Array(), ycoords = new Array(), snFlkTemp;
for( var x = 0; x < numFlakes; x++ ) {
xcoords[x] = ( x + 1 ) / ( numFlakes + 1 );
do { snFlkTemp = Math.round( ( numFlakes - 1 ) * Math.random() );
} while( typeof( ycoords[snFlkTemp] ) == 'number' );
ycoords[snFlkTemp] = x / numFlakes;
}

//now animate
function flakeFall() {
if( !getRefToDivNest('snFlkDiv0') ) { return; }
var scrWidth = 0, scrHeight = 0, scrollHeight = 0, scrollWidth = 0;
//find screen settings for all variations. doing this every time allows for resizing and scrolling
if( typeof( window.innerWidth ) == 'number' ) { scrWidth = window.innerWidth; scrHeight = window.innerHeight; } else {
if( document.documentElement && (document.documentElement.clientWidth ||document.documentElement.clientHeight ) ) {
scrWidth = document.documentElement.clientWidth; scrHeight = document.documentElement.clientHeight; } else {
if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
scrWidth = document.body.clientWidth; scrHeight = document.body.clientHeight; } } }
if( typeof( window.pageYOffset ) == 'number' ) { scrollHeight = pageYOffset; scrollWidth = pageXOffset; } else {
if( document.body && ( document.body.scrollLeft ||document.body.scrollTop ) ) { scrollHeight = document.body.scrollTop;scrollWidth = document.body.scrollLeft; } else {
if(document.documentElement && (document.documentElement.scrollLeft ||document.documentElement.scrollTop ) ) { scrollHeight =document.documentElement.scrollTop; scrollWidth =document.documentElement.scrollLeft; } }
}
//move the snowflakes to their new position
for( var x = 0; x < numFlakes; x++ ) {
if( ycoords[x] * scrHeight > scrHeight - pictureHeight ) { ycoords[x] = 0; }
var divRef = getRefToDivNest('snFlkDiv'+x); if( !divRef ) { return; }
if( divRef.style ) { divRef = divRef.style; } var oPix = document.childNodes ? 'px' : 0;
divRef.top = ( Math.round( ycoords[x] * scrHeight ) + scrollHeight ) + oPix;
divRef.left = ( Math.round( ( ( xcoords[x] * scrWidth ) - (pictureWidth / 2 ) ) + ( ( scrWidth / ( ( numFlakes + 1 ) * 4 ) ) * (Math.sin( lrFlakes * ycoords[x] ) - Math.sin( 3 * lrFlakes * ycoords[x]) ) ) ) + scrollWidth ) + oPix;
ycoords[x] += downSpeed;
}
}

//DHTML handlers
function getRefToDivNest(divName) {
if( document.layers ) { return document.layers[divName]; } //NS4
if( document[divName] ) { return document[divName]; } //NS4 also
if( document.getElementById ) { return document.getElementById(divName); } //DOM (IE5+, NS6+, Mozilla0.9+, Opera)
if( document.all ) { return document.all[divName]; } //Proprietary DOM - IE4
return false;
}

window.setInterval('flakeFall();',100);</script>

có thể thay link ảnh hoa mai 
https://2img.net/r/ihimizer/img143/5785/hoamai.png
bằng những ảnh khác,
https://i.servimg.com/u/f46/16/96/29/15/iaza1510.png


Nguồn: cntt-k3
Chúa Tể Địa Ngục
Chúa Tể Địa Ngục
CPYellowMember
CPYellowMember

Chrome PunBB
Ngày đăng ký : 15/07/2013
Số bài : 2203
CPP : 380
Châm ngôn sống : Không có gì cả :v

http://otaku-world.yourme.net

Về Đầu Trang Go down

Về Đầu Trang

- Similar topics

 
Permissions in this forum:
Bạn không có quyền trả lời bài viết