How to create and attach CSS3 animations directly in chrome inspector?

I know that you can attach hover events directly from the inspector, but how to create and attach CSS3 animations directly in the inspector?

For example, if I try to create something like the following animation using the inspector:

@-webkit-keyframes test{ 0%{background:red} 100%{background:blue} } 

the browser will stop registering the code after the first colon (:) between the words "background" and "red".

+4
source share
1 answer

You can edit directly in css code.

  • Select an item in the inspector
  • Click on the target css (file above the agreed css rules and below the heading "Corresponding CSS Rules")
  • Make your changes.

If you want to select css file:

  • Go to the Resources tab
  • Frames> (frame name)> Style Sheets> nameofthecssfile.css

And finally, if you don’t have a CSS file, you can put your code in HTML using

  • Right click on the body (or any other html tag), select "Edit as HTML"
  • Outside the tag, put your own style, for example:

      <style>
     @ -webkit-keyframes test {
         0% {background: red}
         100% {background: blue}   
     }
     </style>
     <body>
         lorem ipsum
     </body>
    
+5
source

Source: https://habr.com/ru/post/1500934/


All Articles