a{
    animation-name: example1;
    animation-duration: 10s;
    animation-iteration-count: infinite;
}

p{
    animation-name: example1;
    animation-duration: 10s;
    animation-iteration-count: infinite;
}

small{
    animation-name: example1;
    animation-duration: 10s;
    animation-iteration-count: infinite;
}

@keyframes example1 {
    0%{color: green}
    7%{color: #00ffdd}
    14%{color: lightblue}
    21%{color: blue}
    28%{color: purple}
    32%{color: #ff00d4}
    42%{color: red}
    49%{color: orangered}
    56%{color: orange}
    70%{color: #ffc400}
    84%{color: yellow;}
    91%{color: yellowgreen}
    100%{color: green}
}

html {
    animation-name: example;
    animation-duration: 10s;
    animation-iteration-count: infinite;
}

@keyframes example {
    0%{background-color: red;}
    7%{background-color: orangered}
    14%{background-color: orange}
    21%{background-color: #ffc400}
    28%{background-color: yellow;}
    32%{background-color: yellowgreen}
    42%{background-color: green}
    49%{background-color: #00ffdd}
    56%{background-color: lightblue}
    70%{background-color: blue}
    84%{background-color: purple}
    91%{background-color: #ff00d4}
    100%{background-color: red}
}

input[type=text] {
    border: 2px solid red;
    outline: none;
}

input[type=text]:focus {
    animation-name: example2;
    animation-duration: 10s;
    animation-iteration-count: infinite;
}

input[type=password] {
    border: 2px solid red;
    outline: none;
}

input[type=password]:focus {
    animation-name: example2;
    animation-duration: 10s;
    animation-iteration-count: infinite;
}

@keyframes example2 {
    0%{background-color: blue;}
    7%{background-color: purple;}
    14%{background-color: #ff00d4;}
    21%{background-color: red;}
    28%{background-color: orangered;}
    32%{background-color: orange;}
    42%{background-color: #ffc400;}
    49%{background-color: yellow;}
    56%{background-color: yellowgreen;}
    70%{background-color: green;}
    84%{background-color: #00ffdd;}
    91%{background-color: lightblue;}
    100%{background-color: blue;}
}

div.w{
    color: red;
}