Pesquisar neste blog

02/06/2024

Animação com Hélice rotacional em HTML















Código feito em HTML:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  body{
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

img{
    border: 20px solid aqua;
    padding: 50px;
    border-radius: 50%;
    animation: fananim linear infinite;
}

button{
    cursor: pointer;
    width: 100px;
    height: 100px;
    padding: 20px 30px;
    margin: 0 20px;
    font-size: 25px;
    font-weight: 550;
    border: none;
    background-color: silver;
    border-radius: 50%;
    transition: 0.1s;
}

button:active{
    box-shadow: 0px 10px 10px black;
    transform: scale(0.95);
}

.main button:nth-last-child(5){
    background-color: rgb(0, 255, 0);
}

.main button:nth-last-child(4){
    background-color: red;
}
@keyframes fananim {
    100%
    {
        transform: rotate(360deg);
    }
}
</style>
<body>
  <div>
    <img id="img" src="Fan.png" alt="" srcset="">
    <button onclick="myfunon()">ON</button>
    <button onclick="myfunoff()">OFF</button>
    <button onclick="myfun1()">1</button>
    <button onclick="myfun2()">2</button>
    <button onclick="myfun3()">3</button>
  </div>  
 
</body>
  <script>
    let a=document.getElementById("img");
    function myfunon()
    {a.style.animationDuration = 3+"s";}
    function myfunoff()
    {a.style.animationDuration=0+"s";}
    function myfun1()
    {a.style.animationDuration=1+"s";}
    function myfun2()
    {a.style.animationDuration=0.5+"s";}
    function myfun3()
    {a.style.animationDuration=0.1+"s";}
  </script>
</html>


Palavras chave:

Animation with Rotational Helix in HTML
Animación con Hélice Rotacional en HTML
Animasi karo Rotational Helix ing HTML
Animasjon med Rotational Helix i HTML
HTMLдеги Rotational Helix менен анимация
Анимация с использованием вращающейся спирали в HTML
אנימציה עם Rotational Helix ב-HTML
Animation leh Helix Rotational oo HTML ah
HTML의 회전 나선을 사용한 애니메이션

Nenhum comentário: