W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2017

Re: [csswg-drafts] [web-animations-2] Offset syntax

From: Cyril Auburtin via GitHub <sysbot+gh@w3.org>
Date: Tue, 05 Dec 2017 10:34:11 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-349263663-1512470050-sysbot+gh@w3.org>
I would have liked those versions, but I don't want to annoy you more too:)
```js
element.animate({
    '0, 1': { transform: 'translate3d(0, 0, 0)' }, 
    '.1, .3, .5, .7, .9': { transform: 'translate3d(-10px, 0, 0)' },
    '.2, .4, .6, .8': { transform: 'translate3d(10px, 0, 0)' }
}, { duration: 1000 });
```

```js
element.animate([
    ['0, 1', { transform: 'translate3d(0, 0, 0)' }], 
    ['.1, .3, .5, .7, .9', { transform: 'translate3d(-10px, 0, 0)' }],
    ['.2, .4, .6, .8', { transform: 'translate3d(10px, 0, 0)' }]
], { duration: 1000 });
```

```js
element.animate([
    [[0, 1], { transform: 'translate3d(0, 0, 0)' }], 
    [[.1, .3, .5, .7, .9], { transform: 'translate3d(-10px, 0, 0)' }],
    [[.2, .4, .6, .8], { transform: 'translate3d(10px, 0, 0)' }]
], { duration: 1000 });
```

-- 
GitHub Notification of comment by caub
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2064#issuecomment-349263663 using your GitHub account
Received on Tuesday, 5 December 2017 10:34:14 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:44 UTC