Fix typos
This commit is contained in:
@ -9,7 +9,7 @@ excerpt: Learn how to programmatically copy text to clipboard with a few lines o
|
||||
|
||||
### Core functionality
|
||||
|
||||
A very common need when building websites is the ability to copy text to clipboard with a single button click. Javascript can easily do this in five short steps:hout the user selecting it or hitting the appropriate key combination on their keyboard. Javascript can easily do this in five short steps:
|
||||
A very common need when building websites is the ability to copy text to clipboard with a single button click. Javascript can easily do this in five short steps:
|
||||
|
||||
1. Create a` <textarea>` element to be appended to the document. Set its value to the string that we want to copy to the clipboard.
|
||||
2. Append said `<textarea>` element to the current HTML document.
|
||||
|
||||
@ -15,7 +15,7 @@ Using flexbox to vertically and horizontally center content is usually the prefe
|
||||
|
||||
Using the grid module is very much similar to flexbox and is also quite common, especially if you are already using grid in your layout. The only difference from the previous technique is the `display` which is set to `grid` instead. You can view the [Grid centering snippet](/css/s/grid-centering) for the code and examples.
|
||||
|
||||
### Tranform
|
||||
### Transform
|
||||
|
||||
Transform centering uses, as the name implies, CSS transforms to center an element. It depends on the container element having a `position: relative`, allowing the child element to utilize `position: absolute` to position itself. Then `left: 50%` and `top: 50%` are used to offset the child element and `transform: translate(-50%, -50%)` to negate its position. You can view the [Transform centering snippet](/css/s/transform-centering) for the code and examples.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user