forked from NathanStrutz/LESS-CSS-Shapes-Library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
228 lines (191 loc) · 5.65 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!doctype html>
<html>
<head>
<link rel="stylesheet/less" type="text/css" href="shapesExample.less">
<script src="http://lesscss.googlecode.com/files/less-1.2.1.min.js"></script>
</head>
<body>
<article>
<header>
<h1>The Shapes of LESS CSS</h1>
<p>Taken directly from <a href="http://css-tricks.com/examples/ShapesOfCSS/">The Shapes of CSS</a>. Thanks, <a href="http://css-tricks.com/">CSS-Tricks</a>!</p>
<p>All of the shapes below use only a single HTML element. The CSS uses the LESS Shapes library. All the shapes can take size or height & width arguments, some of them have shape-specific arguments like degrees for an angle, and the final argument is always the primary color, which defaults to red.</p>
<p>Visit the <a href="https://github.com/NathanStrutz/LESS-CSS-Shapes-Library">LESS CSS Shapes Library</a> on GitHub to view and download the source code and samples.</p>
</header>
<h3>Square</h3>
<div class="shapespacer"><div class="square"></div></div>
<pre>.square {
.square(100px);
}</pre>
<div class="shapespacer"><div class="square2"></div></div>
<pre>.square2 {
.square(10px, #F0F);
}</pre>
<h3>Circle</h3>
<div class="shapespacer"><div class="circle"></div></div>
<pre>.circle {
.circle(100px);
}</pre>
<h3>Rectangle</h3>
<div class="shapespacer"><div class="rectangle"></div></div>
<pre>.rectangle {
.rectangle(100px);
}</pre>
<h3>Oval</h3>
<div class="shapespacer"><div class="oval"></div></div>
<pre>.oval {
.oval(100px);
}</pre>
<h3>Triangle - Up</h3>
<div class="shapespacer"><div class="triangle-up"></div></div>
<pre>.triangle-up {
.triangle-up(100px);
}</pre>
<h3>Triangle - Down</h3>
<div class="shapespacer"><div class="triangle-down"></div></div>
<pre>.triangle-down {
.triangle-down(100px);
}</pre>
<h3>Triangle - Left</h3>
<div class="shapespacer"><div class="triangle-left"></div></div>
<pre>.triangle-left {
.triangle-left(100px);
}</pre>
<h3>Triangle - Right</h3>
<div class="shapespacer"><div class="triangle-right"></div></div>
<pre>.triangle-right {
.triangle-right(100px);
}</pre>
<h3>Triangle - Top Left</h3>
<div class="shapespacer"><div class="triangle-topleft"></div></div>
<pre>.triangle-topleft {
.triangle-topleft(100px);
}</pre>
<h3>Triangle - Top Right</h3>
<div class="shapespacer"><div class="triangle-topright"></div></div>
<pre>.triangle-topright {
.triangle-topright(100px);
}</pre>
<h3>Triangle - Bottom Left</h3>
<div class="shapespacer"><div class="triangle-bottomleft"></div></div>
<pre>.triangle-bottomleft {
.triangle-bottomleft(100px);
}</pre>
<h3>Triangle - Bottom Right</h3>
<div class="shapespacer"><div class="triangle-bottomright"></div></div>
<pre>.triangle-bottomright {
.triangle-bottomright(100px);
}</pre>
<h3>Parallelogram</h3>
<div class="shapespacer"><div class="parallelogram"></div></div>
<pre>.parallelogram {
.parallelogram(100px);
}</pre>
<div class="shapespacer"><div class="parallelogram2"></div></div>
<pre>.parallelogram2 {
.parallelogram(100px, 40deg);
}</pre>
<div class="shapespacer"><div class="parallelogram3"></div></div>
<pre>.parallelogram3 {
.parallelogram(100px, 340deg);
}</pre>
<h3>Trapezoid</h3>
<div class="shapespacer"><div class="trapezoid"></div></div>
<pre>.trapezoid {
.trapezoid(100px);
}</pre>
<h3>Six-Pointed Star</h3>
<div class="shapespacer"><div class="star-six"></div></div>
<pre>.star-six {
.star-six(100px);
margin:0 0 3em 0;
}</pre>
<h3>Five-Pointed Star</h3>
<div class="shapespacer"><div class="star-five"></div></div>
<pre>.star-five {
.star-five(100px);
margin:3em 0;
}</pre>
<h3>Pentagon</h3>
<div class="shapespacer"><div class="pentagon"></div></div>
<pre>.pentagon {
.pentagon(100px);
margin:3em 0 1em;
}</pre>
<h3>Hexagon</h3>
<div class="shapespacer"><div class="hexagon"></div></div>
<pre>.hexagon {
.hexagon(100px);
margin:2em 0;
}</pre>
<h3>Octagon</h3>
<div class="shapespacer"><div class="octagon"></div></div>
<pre>.octagon {
.octagon(100px, #EEE);
margin:2em 0;
}</pre>
<h3>Heart</h3>
<div class="shapespacer"><div class="heart"></div></div>
<pre>.heart {
.heart(100px);
}</pre>
<h3>Infinity</h3>
<div class="shapespacer"><div class="infinity"></div></div>
<pre>.infinity {
.infinity(100px);
}</pre>
<h3>Diamond</h3>
<div class="shapespacer"><div class="diamond"></div></div>
<pre>.diamond {
.diamond(100px);
}</pre>
<h3>Egg</h3>
<div class="shapespacer"><div class="egg"></div></div>
<pre>.egg {
.egg(100px);
}</pre>
<h3>Pac Man</h3>
<div class="shapespacer"><div class="pacman"></div></div>
<pre>.pacman {
.pacman(100px);
}</pre>
<h3>Talk Bubble</h3>
<div class="shapespacer"><div class="talkbubble1"></div></div>
<pre>.talkbubble1 {
.talkbubble(100px);
margin-left:2em;
}</pre>
<div class="shapespacer"><div class="talkbubble2"></div></div>
<pre>.talkbubble2 {
.talkbubble(100px*2.5, 80px);
margin-left:2em;
}</pre>
<h3>12 Point Burst</h3>
<div class="shapespacer"><div class="burst-12"></div></div>
<pre>.burst-12 {
.burst-12(100px);
margin:2em;
}</pre>
<h3>8 Point Burst</h3>
<div class="shapespacer"><div class="burst-8"></div></div>
<pre>.burst-8 {
.burst-8(100px);
margin:1.5em;
}</pre>
<h3>Cut Diamond</h3>
<div class="shapespacer"><div class="cut-diamond"></div></div>
<pre>.cut-diamond {
.cut-diamond(100px, #CCF); // periwinkle
}</pre>
<h3>Yin Yang</h3>
<div class="shapespacer"><div class="yin-yang"></div></div>
<pre>.yin-yang {
.yin-yang(100px, red, #eee);
}</pre>
<footer>
<h2>End</h2>
<p>Again, big thanks to CSS-Tricks. The <a href="https://github.com/NathanStrutz/LESS-CSS-Shapes-Library">LESS CSS Shapes Library</a> is available on GitHub. Download it. Fork it. Do something amazing with it!</p>
</footer>
</article>
</body>
</html>