-
Notifications
You must be signed in to change notification settings - Fork 1
/
fraction.html
46 lines (46 loc) · 1.56 KB
/
fraction.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
<html>
<head>
<link rel="shortcut icon" type="image/png" href="favicon.png"/>
<style>
body {
font-family: Arial, Helvetica, sans-serif;
background: linear-gradient(#87CEEB, #FFE0B2);
background-repeat: no-repeat;
background-color: #FFE0B2;
background-size: 100% 1000px;
margin: auto;
max-width: 700px;
padding: 10px 10px;
border-left: 1px solid #C0C0C0;
border-right: 1px solid #C0C0C0;
font-size: 16px;
}
div.div1 {
text-align: center;
}
div.title {
text-align: center;
background-color: #C0C0FF
}
</style>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Masterjun | Fraction</title>
</head>
<body onload="approxFrac(); document.getElementById('num').focus();">
<a href=".">< Back</a><br>
<div class="title">
<h2>Decimal to Fraction Approximation</h2>
</div>
<hr>
<div class="div1">
<h3>Enter Decimal:</h3>
<p style='text-align: left; margin-bottom: -22px;'>e.g. <b style="font-family: monospace;">1.84(92)</b></p>
<input id="num" type="text" oninput="approxFrac();"><br><br>
<div style='overflow: auto; padding: 5px; font-family: monospace; font-size: 10pt; text-align: left; margin-bottom: -26px; color: #60C0C0; user-select: none;'>Continued Fraction:</div>
<div id='cont' style='border: 1px solid #000000; border-bottom: 0px; overflow: auto; padding: 5px; font-family: monospace; font-size: 10pt;'>[0]</div>
<div id='frac' style='border: 1px solid #000000; min-height: 300px; overflow: auto; padding: 5px; font-family: monospace; font-size: 10pt;'></div>
</div>
<script src="fraction.js"></script>
</body>
</html>