-
Notifications
You must be signed in to change notification settings - Fork 19
/
linear-gradients-quadrant-top-right.html
executable file
·52 lines (45 loc) · 1.59 KB
/
linear-gradients-quadrant-top-right.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>A gradient headed toward the top right</title>
<style type="text/css">
body {padding: 10em 5em;}
.radial {background-image: linear-gradient(
to top right, #4097FF -25%, #FFBE00, #4097FF 125%
);
height: 200px; width: 500px;
position: relative;
}
div.gradline {
background-color: black;
position: absolute; top: 50%; left: 0;
margin: -2px 0 0; height: 4px; width: 370px;
transform: translateX(65px) rotate(-68.33deg);}
div.imagebox {border: 1px dotted red; position: relative;}
.gradline b {font: 1.25em Helvetica, sans-serif;}
b.pnt {display: inline-block; transform: rotate(68.33deg);}
b.st {position: absolute; top: 1.25em; left: -5%; width: 3em; text-align: center;}
b.label {position: absolute; top: 5px; left: 67%; width: 10em; margin-left: -5em; text-align: center;}
b.en {position: absolute; top: -10px; left: 101%;}
.gradline img {position: absolute; right: 0; top: -5px; height: 15px;}
div.line {position: absolute; height: 2px; width: 195px; transform: rotate(-90deg); top: 0; background: rgba(0,0,0,0.25);}
div.st.line {transform-origin: 0 50%; left: 0;}
div.en.line {transform-origin: 100% 50%; right: 0;}
div.perp.line {width: 538px; transform: translateX(-84px) rotate(90deg); background: rgba(0,0,0,0.5);}
</style>
</head>
<body>
<div class="radial" id="ex01">
<div class="gradline">
<b class="st pnt">starting point</b>
<div class="st line"></div>
<b class="label">gradient line</b>
<b class="en pnt">ending point</b>
<div class="en line"></div>
<div class="perp line"></div>
<img src="i/arrowhead.png">
</div>
</div>
</body>
</html>