Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Razor output @-webkit-keyframes

Tags:

c#

razor

How i can output "@-webkit-keyframes" in a razor page?

I have tries so

@@-webkit-keyframes progressBar {
        0% {
            width: 0;
        }

        100% {
            width: 100%;
        }
    }

but seems not to work. thanks.

like image 987
edotassi Avatar asked Oct 17 '13 15:10

edotassi


People also ask

What is @- webkit keyframes in CSS?

The @keyframes rule specifies the animation code. The animation is created by gradually changing from one set of CSS styles to another. During the animation, you can change the set of CSS styles many times.

What is Razor syntax?

Razor syntax is a simple programming syntax for embedding server-based code in a web page. In a web page that uses the Razor syntax, there are two kinds of content: client content and server code.


1 Answers

Use @@ in front of 'Keyframes' or '-Webkit-..' to make the code work seamlessly.

Here is a dummy piece of code for razor views:

    .blinkMan1 {
        animation: blinker 2s linear 0s forwards;
    }

    .blinkMan2 {
        animation: blinker 2s linear 3s forwards;
    }

    .blinkMan3 {
        animation: blinker 2s linear 6s forwards;
    }

    .blinkMan4 {
        animation: blinker 2s linear 9s forwards;
    }


    /* Chrome, Safari, Opera */
    @@-webkit-keyframes blinker {

        to {
            background-color: rgba(115, 242, 203, 0.80);
        }
    }

    /* Standard syntax */
    @@keyframes blinker {

        to {
            background-color: rgba(115, 242, 203, 0.80);
        }
    }
like image 171
Vikram K Avatar answered Oct 29 '22 11:10

Vikram K