Red de conocimiento informático - Material del sitio web - Cómo utilizar ASP.NET para crear este tipo de efecto especial: ¿puede esperar en línea para recibir el código HTML y script?

Cómo utilizar ASP.NET para crear este tipo de efecto especial: ¿puede esperar en línea para recibir el código HTML y script?

Este efecto especial no tiene nada que ver con asp.net, es principalmente JS

Pruebe el siguiente código, el estilo específico depende de su propio ajuste

lt htmlgt; >

lt ;headgt;

lt;titlegt;Deslizar fuera de la capalt;/titlegt;

lt;scriptgt;

var flag=0;

¿Cómo utilizar ASP.NET para crear este efecto especial? lt;scriptgt;

var flag=0;

función f_s(id){

var obj=document.getElementById(id);

obj.style.display="bloque";

obj.style.height="1px";

var changeW=function(){ p>

var obj_h=parseInt(obj.style.height);

if(obj_hlt;=335){

obj.style.height=(obj_h Matemáticas .ceil ((335-obj_h)/10)) "px";

}

else{

clearInterval(bw1); p> }

}

}

bw1= setInterval(changeW, 1);

if(flaggt; 0){

clearInterval(bw2);

}

}

}

función closeW(id){

bandera;

var obj=document.getElementById(id);

var closeDiv=function(){

clearInterval(bw1);

p>

var obj_h=parseInt(obj.style.height);

if(obj_hgt; 1){

obj.style.height); =(obj_h-Math.ceil (obj_h)/10) "px";

}

else{

clearInterval(bw2);

obj.style. display="none";

}

}

}

bw2= setInterval(closeDiv, 1);

//alert(bandera)

}

función showDiv(){

var ele = document.getElementById( "div1");

p>

clearInterval(bw1);

clearInterval(bw2);

ele.style.display = "bloque";

ele.style altura = 335 "px";

}

>lt;/scriptgt;

lt;/headgt;

lt;bodygt;

lt;div onclick="f_s('div1')" estilo =" posición: absoluta; fondo: negro; izquierda: 536px; arriba: 36px; ancho: 150px; altura: 22px; relleno: 8px; color: blanco; tamaño de fuente: 9pt; "gt; .....lt;/divgt;

lt;div id="div1" style="posición: absoluta; fondo: aguamarina; relleno: 8px; tamaño de fuente: 9pt; izquierda: 451px; desbordamiento: oculto; arriba: 68px; ancho: 330px; visualización: ninguno" onclick="closeW('div1')"gt; haga clic aquí para cerrar los detalles. .....lt;/divgt;

lt;/bodygt;

lt;/htmlgt;