Hace unos dias estaba en este chat: https://ciberluna.com/ y estaba hablando en sala, cuando un administrador me dice: AGUANTATE!!!
yo no entendi, y de momento el chat se empezo a mover de un lado a otro, como si fuese un terremoto!!! como pudo haber hecho eso? Alguien ha hecho un algoritmo similar?
explicate "moverse de un lado a otro"
No es ningun algoritmo, es solo animacion css hay millones de ejemplos.. este es desde la pagina
@-webkit-keyframes shake {
from,
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
10%,
30%,
50%,
70%,
90% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
20%,
40%,
60%,
80% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
}
@keyframes shake {
from,
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
10%,
30%,
50%,
70%,
90% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
20%,
40%,
60%,
80% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
}
.shke {
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-name: shake;
animation-name: shake;
}
Cita de: EFEX en 5 Julio 2017, 06:41 AM
No es ningun algoritmo, es solo animacion css hay millones de ejemplos.. este es desde la pagina
@-webkit-keyframes shake {
from,
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
10%,
30%,
50%,
70%,
90% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
20%,
40%,
60%,
80% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
}
@keyframes shake {
from,
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
10%,
30%,
50%,
70%,
90% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
20%,
40%,
60%,
80% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
}
.shke {
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-name: shake;
animation-name: shake;
}
wow, muy bueno, supongo que hay un poco de JqueryUi haciendo el trabajo en esas ventanas, je que buen ejemplo de trollear al usuario.
yo se que era una animacion css :rolleyes: xD, pero la forma en que el administrador controlaba quien la veia o no!!!!
en jscript... si llega x mensaje, entonces agrega la clase a el elemento, espera 3 segundos y remueve
en jscript
entonces no necesitas tener un codigo en el backend que te permita manejar el frontend de un usuario en especifico de esa manera?
Cita de: magodiesan en 13 Julio 2017, 05:45 AM
en jscript
entonces no necesitas tener un codigo en el backend que te permita manejar el frontend de un usuario en especifico de esa manera?
esto no tiene mucho sentido... el backend no controla el comportamiento en navegador...
esto se llaman mensajes de control... si un mensaje con una codificación especifica se envía, el servidor revisa si es para el, de ser así se comete una acción, si no, lo redirige al usuario des tino el paquete, si llega al cliente un mensaje de control se dispara una acción...
ejemplo cuando aquí usas las etiquetas