Git Product home page Git Product logo

Comments (12)

juliangarnier avatar juliangarnier commented on May 6, 2024 2

Ok thanks!
I think I'll change the way CSS animation is detected, and fallback to a value of 0 for properties that are not supported by getComputedStyle.

Will check this asap.

from anime.

canova avatar canova commented on May 6, 2024 1

@averyillson The javascript is dynamically creating the border-radius, it is not related to css file. Also Firefox doesn't use -moz- prefix for border-radius since Firefox 4.

from anime.

canova avatar canova commented on May 6, 2024 1

I found a SO question and it seems Firefox require a specific corner to get property value.
Working code:
http://codepen.io/canaltinova/pen/JKWMPR?editors=1111
SO link:
http://stackoverflow.com/questions/10803023/why-wont-getpropertyvalue-return-a-value-for-the-borderradius-property

from anime.

lepryko avatar lepryko commented on May 6, 2024

Got the same problem with Edge and even IE11, I don't even see border-radius property in DOM, just transform.

from anime.

averyillson avatar averyillson commented on May 6, 2024

Are you using the -moz- prefix in the css?

from anime.

juliangarnier avatar juliangarnier commented on May 6, 2024

It's because getComputedStyle(div).getPropertyValue('border-radius') doesn't return anything on IE / FF;

Not sure if it's a browser bug or something else :
http://codepen.io/juliangarnier/pen/BzWmGx?editors=0111

Any ideas?

from anime.

seleckis avatar seleckis commented on May 6, 2024

Still not resolved :(

from anime.

juliangarnier avatar juliangarnier commented on May 6, 2024

Working perfectly.

https://codepen.io/juliangarnier/pen/3a940ac85e26d7303a34b5c270cb8035

from anime.

seleckis avatar seleckis commented on May 6, 2024

No, it is not: https://codepen.io/seleckis/pen/ZamqJp

from anime.

juliangarnier avatar juliangarnier commented on May 6, 2024

As @canaltinova said, Firefox always returns 0 when using borderRadius.
In your example, you have to specify the initial value like this:

anime({
  targets: 'div',
  borderRadius: ['80px', '0px'],
  direction: 'alternate',
  loop: true
});

Or if you really can't specify the initial value, you can also do this 😂

anime({
  targets: 'div',
  borderTopLeftRadius: 0,
  borderTopRightRadius: 0,
  borderBottomRightRadius: 0,
  borderBottomLeftRadius: 0,
  direction: 'alternate',
  loop: true
});

from anime.

seleckis avatar seleckis commented on May 6, 2024

I see. But documentation is still confusing newbies. There is an example which does not work in FF.

from anime.

juliangarnier avatar juliangarnier commented on May 6, 2024

Ah good catch! I forgot to update the doc.
Will do in the next release.
Thanks!

from anime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.