FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: edit css-animations article and task en by front42 · Pull Request #3944 · javascript-tutorial/en.javascript.info · GitHub

Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .html  (1) .md  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
      • index.html
    • article.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,13 @@
transform: translateX(-50%) translateY(-50%);
background-color: red;
border-radius: 50%;

width: 200px;
height: 200px;
top: 150px;
left: 150px;
}
</style>
</head>

<body>

<div class="circle"></div>
<button onclick="showCircle(150, 150, 100)">showCircle(150, 150, 100)</button>

</body>
</html>
8 changes: 4 additions & 4 deletions 7-animation/2-css-animations/article.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ The CSS `transition` is based on that curve:

...And how can we show a train slowing down?

We can use another Bezier curve: `cubic-bezier(0.0, 0.5, 0.5 ,1.0)`.
We can use another Bezier curve: `cubic-bezier(0.0, 0.5, 0.5, 1.0)`.

The graph:

Expand All @@ -190,7 +190,7 @@ CSS:
```css
.train {
left: 0;
transition: left 5s cubic-bezier(0, .5, .5, 1);
transition: left 5s cubic-bezier(0, 0.5, 0.5, 1);
/* click on a train sets left to 450px, thus triggering the animation */
}
```
Expand All @@ -214,7 +214,7 @@ So we could use `ease-out` for our slowing down train:
.train {
left: 0;
transition: left 5s ease-out;
/* same as transition: left 5s cubic-bezier(0, .5, .5, 1); */
/* same as transition: left 5s cubic-bezier(0, 0.5, 0.5, 1); */
}
```

Expand All @@ -229,7 +229,7 @@ In the example below the animation code is:
```css
.train {
left: 100px;
transition: left 5s cubic-bezier(.5, -1, .5, 2);
transition: left 5s cubic-bezier(0.5, -1, 0.5, 2);
/* click on a train sets left to 450px */
}
```
Expand Down

Back | FazBrowse Home | New Git URL