Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #36584
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: TWO lines of code for transforms? |
| Date | 2019-05-10 14:27 +0200 |
| Organization | PointedEars Software (PES) |
| Message-ID | <7fdff281-9436-e4a8-c2a6-c019042f329d@PointedEars.de> (permalink) |
| References | <de0b77b1-4e91-4d2f-b449-8f554ad3bd6f@googlegroups.com> |
groovee@cyberdude.com wrote: > OK I know, from DOING, that the following will make something spin 45 degrees: > > blah.style.transition = "transform 1s"; > blah.style.transform = "rotate(45deg)"; > > ...but I have no idea WHY this works. Why are TWO lines of code necessary for this, The first statement defines that the “transform” style property should be used for transitions with a duration of 1 second. The second statement might start the transition by changing the value of the watched style property. Whether it starts a transition or merely prepares a future transition depends on the previous value of the watched style property. Note that due to the single-threadedness of the code a transition will usually not start before control is returned to the calling execution context. It will start immediately if executed in the global context, unless it has a defined delay, there is a process that takes precedence, or CSS transitions are not supported (rare nowadays). See also <https://developer.mozilla.org/CSS> or something to that effect. > and indeed what is the exact difference between a transition and a transform?? Google is your friend. [psf 6.1] And get a real name. -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
TWO lines of code for transforms? groovee@cyberdude.com - 2019-05-10 03:52 -0700
Re: TWO lines of code for transforms? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-05-10 13:38 +0200
Re: TWO lines of code for transforms? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-05-10 14:27 +0200
Re: TWO lines of code for transforms? "Mark-" <nospam@mapson.xyz> - 2019-05-10 14:13 +0000
Re: TWO lines of code for transforms? John G Harris <niam@jghnorth.org.uk.invalid> - 2019-05-11 11:26 +0100
Re: TWO lines of code for transforms? Julio Di Egidio <julio@diegidio.name> - 2019-05-11 04:20 -0700
Re: TWO lines of code for transforms? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-05-11 14:31 +0100
Re: TWO lines of code for transforms? Julio Di Egidio <julio@diegidio.name> - 2019-05-11 08:29 -0700
Re: TWO lines of code for transforms? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-05-11 16:59 +0100
Re: TWO lines of code for transforms? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-05-11 17:55 +0200
Re: TWO lines of code for transforms? John G Harris <niam@jghnorth.org.uk.invalid> - 2019-05-11 18:31 +0100
Re: TWO lines of code for transforms? Gene Wirchenko <genew@telus.net> - 2019-05-11 22:01 -0700
Re: TWO lines of code for transforms? John G Harris <niam@jghnorth.org.uk.invalid> - 2019-05-11 18:18 +0100
Re: TWO lines of code for transforms? Gene Wirchenko <genew@telus.net> - 2019-05-11 22:04 -0700
Re: TWO lines of code for transforms? John G Harris <niam@jghnorth.org.uk.invalid> - 2019-05-12 10:27 +0100
Re: TWO lines of code for transforms? Gene Wirchenko <genew@telus.net> - 2019-05-14 10:44 -0700
Re: TWO lines of code for transforms? Ram Tobolski <ramtob@gmail.com> - 2019-05-11 07:06 -0700
Re: TWO lines of code for transforms? groovee@cyberdude.com - 2019-05-13 04:28 -0700
Re: TWO lines of code for transforms? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-05-13 13:38 +0100
Re: TWO lines of code for transforms? groovee@cyberdude.com - 2019-05-13 07:31 -0700
Re: TWO lines of code for transforms? Ram Tobolski <ramtob@gmail.com> - 2019-05-13 09:11 -0700
Re: TWO lines of code for transforms? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-05-13 17:14 +0100
Re: TWO lines of code for transforms? groovee@cyberdude.com - 2019-05-14 23:56 -0700
Re: TWO lines of code for transforms? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-05-15 09:43 +0200
Re: TWO lines of code for transforms? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-05-15 22:06 +0100
csiph-web