Can you change CSS3 animation keyframe attributes inline (i.e. in the HTML style attribute)?

后端 未结 6 1575
别跟我提以往
别跟我提以往 2020-12-31 03:01

Is it possible to change the animation keyframe attributes by making inline adjustments.

Take for example

@-moz-keyframes slidein {
    from {
               


        
6条回答
  •  孤城傲影
    2020-12-31 03:25

    Hey so lets think a little different... You may not be able to do this...

    but think of doing it like this...

    
    

    This is pretty open to whatever you want to do... you would always have the classes you will put on elements but sometimes we dont want to constantly have the same "from" and "to" so this can be one way to do this... basically you dynamically create a style element put whatever string that will end up being the needed style text and then append it to the body... works pretty good... used it in my own framework... I don't do it exactly like this but I wrote it out like this for visibility... reason why this works in a good way is cause a lot of my DOM is created dynamically as well so it may make more sense in that implementation...

    Nothing is impossible... just think outside the div

提交回复
热议问题