-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
87 lines (81 loc) · 2.53 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CSS Snippet Cheat Sheet</title>
<link rel="stylesheet" href="./assets/css/reset.css" />
<link rel="stylesheet" href="./assets/css/style.css" />
</head>
<body>
<header>
<h1>CSS Snippet Cheatsheet</h1>
<p>Ever have trouble recallig the exact syntax for your favorite CSS code?<br>
Give it a permanent home and add it to this page!<br>
Select any snippet below and it'll automatically select all the code for you to copy</p>
</header>
<main>
<flashgroup class="flashgroup">
<flashcard class="flashcard">
<h2>Flexbox Row</h2>
<p>Use these three properties to create a Flexbox row layout.</p>
<pre><code>.row {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}</code></pre>
</flashcard>
<flashcard class="flashcard">
<h2>Flexbox Column</h2>
<p>Use this to create a Flexbox column layout.</p>
<pre><code> .column {
display: flex;
flex-direction: column
}</code></pre>
</flashcard>
<flashcard class="flashcard">
<h2>CSS Grid Layout</h2>
<p>Build a 12-column layout using CSS Grid</p>
<pre><code>.grid {
display: grid;
width: 100%;
grid-template-columns: repeat(12, 1fr);
}</code></pre>
</flashcard>
<flashcard class="flashcard">
<h2>Linear Gradients</h2>
<p>This will create a background linear gradient from top to bottom.</p>
<pre><code>.linear-gradient-background {
background-image: linear-gradient(
rgba(232, 102, 236, 0.3) 0%,
rgba(232, 102, 236, 0.6) 100%);
}</code></pre>
</flashcard>
<flashcard class="flashcard">
<h2>Box Transition Glow</h2>
<p>Use transition and box shadows to glow on hover.</p>
<pre><code>.code-card .card-header {
border-radius: 8px;
transition: all 0.5s ease-in-out;
}
.code-card:hover,
.code-card:hover .card-header {
box-shadow: inset 0px 0px 8px rgba(232, 102, 236, 1),
0 0 15px rgba(232, 102, 236, 1);
}</code></pre>
</flashcard>
<flashcard class="flashcard">
<h2>Overlay Card with Title</h2>
<p>Use position properties and negative margins to raise elements higher than their natural starting point.</p>
<pre><code>.card-header {
position: relative;
margin-top: -20px;
}</code></pre>
</flashcard>
</flashgroup>
</main>
<footer>
<h2>Made with ❤️ and CSS</h2>
</footer>
</body>
</html>