조회 : 265
<span layer_up(Layer1);" >메뉴1</span>
※ Layer1,Layer2,Layer3,Layer4 라는 레이어를 사용하고 있을 경우
메뉴1에 마우스 커서를 올리면 해당 레이어가 부드럽게 나타나고, 나머지 레이어를 사라진다.
<script>
//----------- 레이어 알파 변화용-----------
layer_target= null;
layer_id_time= null;
count_alpha = 0;
var alpha_step = 5; //알파 변화 단계
var alpha_max = 100; //최대 알파값
function layer_up(layer_zero)
{
layer_target = layer_zero;
if(layer_target.style.visibility != 'visible'){
layer_down()
layer_target.style.visibility = 'visible';
ch_layer();
}
}
function ch_layer()
{
layer_target.style.filter = "alpha(opacity="+count_alpha+")" ;
layer_target.style.visibility = 'visible';
//alert(layer_target.style.filter);
count_alpha += alpha_step;
if(count_alpha < (alpha_max+1)){ layer_id_time = setTimeout(ch_layer , 100); }
}
function layer_down()
{
count_alpha = 0;
//clearTimeout(layer_id_time)
Layer1.style.visibility = 'hidden';
Layer2.style.visibility = 'hidden';
Layer3.style.visibility = 'hidden';
Layer4.style.visibility = 'hidden';
Layer1.style.filter = 'alpha(opacity=0)';
Layer2.style.filter = 'alpha(opacity=0)';
Layer3.style.filter = 'alpha(opacity=0)';
Layer4.style.filter = 'alpha(opacity=0)';
// this_target.style.color ='#cecece';
}
//----------------------------------------------------
</script>
제목 | 작성자 | 날짜 |
---|---|---|
공대여자 | ||
공대여자 | ||
mins01 | ||
mins01 | ||
mins01 | ||
mins01 | ||
mins01 | ||
mins01 | ||
mins01 | ||
mins01 | ||
mins01 | ||
mins01 | ||
mins01 | ||
mins01 | ||
mins01 | ||
mins | ||
mins01 | ||
mins01 |