Pesquisar neste blog

21/03/2023

Animação Load com CSS

Saída gerada




<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Loader Animation</title>
    <meta http-equiv="refresh" content="5">
</head>
<style>
    *{
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    body{
        width: 100%;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        background: rgb(4, 37, 72);
    }
    .container{
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .circle{
        width: 200px;
        height: 200px;
        border: 0px solid black;
        border-radius: 50%;
        position: absolute;
    }
    .circle:nth-child(1){
        border-bottom-width: 8px;
        border-color: orange;
        animation: rotate1 2s linear infinite;
    }
    .circle:nth-child(2){
        border-bottom-width: 8px;
        border-color: white;
        animation: rotate2 2s linear infinite;
    }
    .circle:nth-child(3){
        border-bottom-width: 8px;
        border-color: rgb(20, 201, 14);
        animation: rotate3 2s linear infinite;
    }
    @keyframes rotate1 {
        0%{
            transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
        }
        100%{
            transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
        }
    }
    @keyframes rotate2 {
        0%{
            transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
        }
        100%{
            transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
        }
    }
    @keyframes rotate3 {
        0%{
            transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
        }
        100%{
            transform: rotateX(35deg) rotateY(55deg) rotateZ(-360deg);
        }
    }
    .loading{
        color: white;
    }
</style>
<body>
    <div class="container">
        <div class="circle"></div>
        <div class="circle"></div>
        <div class="circle"></div>
        <span class="loading">Loading</span>
    </div>
</body>
</html>

20/03/2023

Animação gradiente com CSS

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="refresh" content="3">
    <title>Campo elemento</title>
    <link rel="stylesheet" href="estilo.css">  
    <style>
        .fr{
            height: 10rem;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            text-align: center;
            font-size: 60px;
        }
        .cr{
            background: linear-gradient(90deg, #80ff80 0%, cyan 16%,
             magenta 50%, yellow 83%, #80f 100%);
            background-size: 300% 300%;
            animation: toggle 5s infinite;
        }
        @keyframes toggle{
            from{
                background-position: 0% 50%;
            }
            to{
                background-position: 100% ;
            }
        }
    </style>            
</head>

<body>
    <div class="fr cr">6A Tecnologia</div>
</body>
</html>

Saída gerada







19/03/2023

Selecionar data e hora em HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="date"><br>
    <input type="datetime-local"><br>
    <input type="time">
</body>
</html>

Saída gerada






18/03/2023

Load com CSS

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="refresh" content="5">
    <title>Load</title>

<style>
    body{
        display: flex;
        justify-content: center;
        align-items: center;        
    }
    .load_1{
        margin-top: 10px;
        width: 100px;
        height: 100px;
        border-top: 10px solid red;
        border-left: 10px solid blue;
        border-right: 10px solid green;
        border-bottom: 10px solid yellow;
        border-radius: 50%;
        /*animation: load 1s ease infinite;*/
        animation: load 1s linear infinite;
    }
    h2{
        margin: -88px;
    }
    @keyframes load {
        to{
            transform: rotate(1turn);
        }
    }
</style>
</head>
<body>
    <h2>Load</h2>
    <div class="load_1">
    </div>
</body>
</html>

Saída gerada





17/03/2023

Efeito de animação com CSS

Saída gerada






















<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Efeito de animação</title>
</head>
<style>
    body{
        margin: 0;
        padding: 0;
    }
    .container{
        width: 100%;
        height: 100vh;
        position: relative;
        background:  white;
    }
    .span-container{
        width: 100px;
        height: 100px;
        transform: translate(-50%, -50%);
        position: absolute;
        top: 42%;
        left: 45%;
    }
    span{
        display: block;
        position: absolute;
        width: 40%;
        height: 40%;
        border-radius: 50%;
        animation: speed 2s infinite ease-in-out;
    }
    .one{
        background: yellow;
        animation-delay: 2s;
    }
    .two{
        background: #a308ce;
        animation-delay: 1.5s;
    }
    .three{
        background:  greenyellow;
        animation-delay: 1s;
    }
    .four{
        background: orangered;
        animation-delay: .5s;
    }
    @keyframes speed{
    0%{
       transform: translate(0%);
       border-radius: 50%;
    }
    25%{
       transform: translate(150%) scale(0.5);
    }
       50%{
       transform: translate(150%, 150%);
       border-radius: 50%;
    }
    75%{
        transform: translate(0, 150%) scale(0.5);
        border-radius: 0%;
    }
}
</style>
<body>
    <div class="container">
        <div class="span-container">
            <span class="one"></span>
            <span class="two"></span>
            <span class="three"></span>
            <span class="four"></span>
        </div>
    </div>
</body>
</html>

16/03/2023

Loading animation com CSS

Saída gerada




















<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="refresh" content="10">
    <title>Campo elemento</title>
    <link rel="stylesheet" href="estilo.css">    
    <style>
        body{
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        background-color: #000;
        background-color: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
    }
    h1{
        position: relative;
        color: #e77811;
        font-size: 4em;
        letter-spacing: 5px;
        border-bottom: 18px solid #333;
        line-height: 1.4;
        font-family: consolas;
        text-transform: uppercase;
    }

    h1::before{
        content: attr(data-text);
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        color: dodgerblue;
        border-bottom: 16px solid dodgerblue;
        animation: lod 4s linear infinite;
        overflow: hidden;
    }
    @keyframes lod{
        0% {
            width: 0;
        }
        100% {
            width: 100%;
        }
    }        
    </style>
         
</head>
<body>
    <h1 data-text="Loading...">Loading...</h1>
</body>
</html>

15/03/2023

Rotação preloader com CSS

Saída gerada no navegador



























<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="refresh" content="3">
    <title>Document</title>
</head>
<style>
    body{
        height: 100vh;
        display: grid;
        place-items: center;
    }
    .wrapper{
        width: 100px;
        height: 100px;
        position: relative;
    }
    .circle{
        position: absolute;
        left: 50%;
        top: 50%;
        width: calc(100% - 10px);
        height: calc(100% - 10px);
        transform: translate(-50%, -50%) rotate(0deg);
        border-radius: 50%;
        border: 5px solid;
        border-color: black black transparent transparent;
        animation: round 1s linear infinite;
        text-align: inherit;
    }
    .c2{
        border-color: transparent transparent red red;
        width: calc(100% - 30px);
        height: calc(100% - 30px);
       
    }
    @keyframes round {
        0%{
            transform: translate(-50%, -50%) rotate(0deg);
        }
        100%{
            transform: translate(-50%, -50%) rotate(calc(360deg * var(--i)));
        }
    }
</style>
<body>
    <div class="wrapper">
        <div class="circle c1" style="--i:1"></div>
        <div class="circle c2" style="--i:-1"></div>
    </div>
</body>
</html>

14/03/2023

Animação com texto usando CSS

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="refresh" content="3">
    <title>Campo elemento</title>
   
       
    <style>
        #container{
            background-color: #000;

        }
        h1{
            -webkit-text-stroke: .5vh #fff;
            font-size: 30vw;
            font-weight: bold;
            text-align: center;
            text-transform: uppercase;
            background-image: url(img/energisa.jpg);
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
            animation: text 10s ease alternate infinite;
        }
        @keyframes text{
            from{
                background-position: 0% 50%;
            }
            to{
                background-position: 100% 50%;
            }
        }
        .scale{
            transform: scale(1);
        }
    </style>
         
</head>

<body id="container">
    <div>
        <h1>Like !</h1>
    </div>
</body>
</html>

Saída gerada



13/03/2023

Imagem refletida com CSS

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="refresh" content="5">
    <title>Imagem refletida</title>
    <link rel="stylesheet" type="text/css" href="estilo.css">

<style>
    .imagem{
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 20px;
    background: url(https://cdn.britannica.com/66/80466-050-2E125F5C/Arc-de-Triomphe-Paris-France.jpg?w=300) center;
    background-size: cover;
}
.imagem::before, .imagem::after{
    content: '';
    width: 100%;
    height: 100%;
    bottom: -220px;
    border-radius: inherit;
    position: absolute;
}
.imagem::before{
    background: inherit;
    opacity: .6;
    transform: scaleY(-1);
}
.imagem::after{
    background: linear-gradient(0deg, #fff,
     sT, #FFF0 100%);

}
</style>
</head>
<body>
    <div class="imagem"></div>
</body>
</html>

Saída gerada















12/03/2023

Limitar o campo da escrita em CSS

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="refresh" content="3">
    <title>Campo elemento</title>
   
       
    <style>
        h1{
            width: 400px;
            border: 3px solid;
           
            white-space: nowrap;/*no final não quebre a linha*/
            overflow: hidden; /*se passar do limite vai esconder*/
            text-overflow: ellipsis; /*se passar coloca ...*/

        }
        .scale{
            transform: scale(1);
        }
    </style>
         
</head>

<body>
    <h1>Seja bem vindo ao Blog da Engenharia Codidiana</h1>
</body>
</html>

Saída gerada









Palavras chave:

Limit the field of writing in CSS
CSS дээр бичих талбарыг хязгаарлах
په CSS کې د لیکلو ساحه محدوده کړئ
Limit di fild fɔ rayt insay CSS
سی ایس ایس میں لکھنے کے شعبے کو محدود کریں۔
הגבל את תחום הכתיבה ב-CSS
Piirake CSS-is kirjutamisvälja
Begränsa fältet för att skriva i CSS