Portal    Foro    Buscar    FAQ    Registrarse    Conectarse


Publicar nuevo tema  Responder al tema 
Página 1 de 1
 
 
CSS3 Con Gambas: Un Ejemplo
Autor Mensaje
Responder citando   Descargar mensaje 
Mensaje CSS3 Con Gambas: Un Ejemplo 
 
El protocolo CSS3 funciona bien bastante con Gambas.
Vemos un ejemplo de simple animación.

* activamos el componente gb.qt4.webkit;
* ponemos sobre el Form el objeto WebView;
* creamos un archivo con extensión html, que llamaremos h.html, y en el que insertaremos el siguiente código:
<DOCTYPE>  
<html>  
<head>  
<style>  
div  
{  
width:50px;  
height:50px;  
background:red;  
position:relative;  
animation-name:myfirst;  
animation-duration:5s;  
animation-timing-function:linear;  
animation-delay:2s;  
animation-iteration-count:infinite;  
animation-direction:alternate;  
animation-play-state:running;  
/* Firefox: */  
-moz-animation-name:myfirst;  
-moz-animation-duration:5s;  
-moz-animation-timing-function:linear;  
-moz-animation-delay:2s;  
-moz-animation-iteration-count:infinite;  
-moz-animation-direction:alternate;  
-moz-animation-play-state:running;  
/* Safari and Chrome: */  
-webkit-animation-name:myfirst;  
-webkit-animation-duration:5s;  
-webkit-animation-timing-function:linear;  
-webkit-animation-delay:2s;  
-webkit-animation-iteration-count:infinite;  
-webkit-animation-direction:alternate;  
-webkit-animation-play-state:running;  
/* Opera: */  
-o-animation-name:myfirst;  
-o-animation-duration:5s;  
-o-animation-timing-function:linear;  
-o-animation-delay:2s;  
-o-animation-iteration-count:infinite;  
-o-animation-direction:alternate;  
-o-animation-play-state:running;  
}  
  
@keyframes myfirst  
{  
0%   {background:red; left:0px; top:0px;}  
25%  {background:yellow; left:200px; top:0px;}  
50%  {background:blue; left:200px; top:200px;}  
75%  {background:green; left:0px; top:200px;}  
100% {background:red; left:0px; top:0px;}  
}  
  
@-moz-keyframes myfirst /* Firefox */  
{  
0%   {background:red; left:0px; top:0px;}  
25%  {background:yellow; left:200px; top:0px;}  
50%  {background:blue; left:200px; top:200px;}  
75%  {background:green; left:0px; top:200px;}  
100% {background:red; left:0px; top:0px;}  
}  
  
@-webkit-keyframes myfirst /* Safari and Chrome */  
{  
0%   {background:red; left:0px; top:0px;}  
25%  {background:yellow; left:200px; top:0px;}  
50%  {background:blue; left:200px; top:200px;}  
75%  {background:green; left:0px; top:200px;}  
100% {background:red; left:0px; top:0px;}  
}  
  
@-o-keyframes myfirst /* Opera */  
{  
0%   {background:red; left:0px; top:0px;}  
25%  {background:yellow; left:200px; top:0px;}  
50%  {background:blue; left:200px; top:200px;}  
75%  {background:green; left:0px; top:200px;}  
100% {background:red; left:0px; top:0px;}  
}  
</style>  
</head>  
<body>  
  
<div></div>  
  
</body>  
</html>

* insertamos el fichero h.html por ejemplo en "/tmp/" (o en una otra ruta);

* el código del proyecto gambas serà:
Public Sub Form_Open()  
  
   WebView1.Url = "/tmp/h.html"  
  
 End

 



 
última edición por vuott el Sabado, 04 Octobre 2014, 01:47; editado 1 vez 
vuott - Ver perfil del usuarioEnviar mensaje privado 
Volver arribaPágina inferior
Mostrar mensajes anteriores:    
 

Publicar nuevo tema  Responder al tema  Página 1 de 1
 

Usuarios navegando en este tema: 0 registrados, 0 ocultos y 1 invitado
Usuarios registrados conectados: Ninguno


 
Lista de permisos
No puede crear mensajes
No puede responder temas
No puede editar sus mensajes
No puede borrar sus mensajes
No puede votar en encuestas
No puede adjuntar archivos
Puede descargar archivos
No puede publicar eventos en el calendario



  

 

cron