Skip to content

Commit d579830

Browse files
committed
Add Style A Background With A Linear Gradient as a css til
1 parent 7de68be commit d579830

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
1010
For a steady stream of TILs from a variety of rocketeers, checkout
1111
[til.hashrocket.com](https://til.hashrocket.com/).
1212

13-
_723 TILs and counting..._
13+
_724 TILs and counting..._
1414

1515
---
1616

@@ -96,6 +96,7 @@ _723 TILs and counting..._
9696
- [Lighten And Darken With SCSS](css/lighten-and-darken-with-scss.md)
9797
- [Make A Block Of Text Respect New Lines](css/make-a-block-of-text-respect-new-lines.md)
9898
- [Parameterized SCSS Mixins](css/parameterized-scss-mixins.md)
99+
- [Style A Background With A Linear Gradient](css/style-a-background-with-a-linear-gradient.md)
99100

100101
### Devops
101102

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Style A Background With A Linear Gradient
2+
3+
The
4+
[`linear-gradient`](https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient)
5+
function in its simplest form can be used to style the background of an
6+
element with a vertical, linear gradient between two colors.
7+
8+
<p data-height="251" data-theme-id="0" data-slug-hash="pQpypW"
9+
data-default-tab="result" data-user="jbranchaud" data-pen-title="pQpypW"
10+
class="codepen">See the Pen <a
11+
href="https://codepen.io/jbranchaud/pen/pQpypW/">pQpypW</a> by Josh
12+
Branchaud (<a href="https://codepen.io/jbranchaud">@jbranchaud</a>) on <a
13+
href="https://codepen.io">CodePen</a>.</p>
14+
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>
15+
16+
Here is what the CSS looks like:
17+
18+
```css
19+
.container {
20+
background: linear-gradient(#00449e, #e66465);
21+
}
22+
```
23+
24+
The background of any element with the `container` class will be styled with
25+
a linear gradient that transitions from `#00449e` to `#e66465`.

0 commit comments

Comments
 (0)