diff --git a/ba.jpg b/ba.jpg new file mode 100644 index 0000000..01e4962 Binary files /dev/null and b/ba.jpg differ diff --git a/back.jpg b/back.jpg new file mode 100644 index 0000000..c09930d Binary files /dev/null and b/back.jpg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..76af66b --- /dev/null +++ b/index.html @@ -0,0 +1,41 @@ + + + + + + + + temperature convertor + + + + + + + TEMPERATURE CONVERTOR +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
© created by Himanshi Rana
+ + + + \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..580da7b --- /dev/null +++ b/script.js @@ -0,0 +1,38 @@ + +var cel = document.getElementById('cel'); +var fah = document.getElementById('fah'); +var kel = document.getElementById('kel'); + +cel.addEventListener('input',function(){ + console.log("Celsius value changed"); + let c=this.value; + let f=((c*9/5)+32).toFixed(2); + let k=((c-0)+273.15).toFixed(2); + fah.value=f; + kel.value=k; +}); +fah.addEventListener('input', function(){ + console.log("Celsius value changed"); + let f=this.value; + let c=((f - 32) * 5/9).toFixed(2); + let k = ((f- 32) * 5/9 + 273.15).toFixed(2); + cel.value=c; + kel.value=k; + +}); +kel.addEventListener('input', function(){ + console.log("Celsius value changed"); + let k=this.value; + let c=(k - 273.15).toFixed(2); + let f= ((k - 273.15) * 9/5 + 32).toFixed(2); + cel.value=c; + fah.value=f; +}); + + + + + + + + diff --git a/style.css b/style.css new file mode 100644 index 0000000..7ba9611 --- /dev/null +++ b/style.css @@ -0,0 +1,44 @@ +body{ + + background-image: url("back.jpg"); +} +.tt +{ + display: flex; +justify-content: center; +align-items: center; + color:blue ; + font-size: 20px; + margin-left: 35%; +margin-top: 4%; +display: inline-block; +background-image:url("ba.jpg") ; +margin-bottom: 40px; +padding: 27px 8%; + +} + + #container + { + +justify-content: center; +align-items: center; +margin-left: 35%; + + + } + .tit + { + display: inline-block; +background-color:gray; +color:#FFFACD ; +padding: 15px; +margin-bottom: 10px; + } + .inp + { +font-size: 20px; + color: brown; + opacity: 80%; + padding: 25px; + } \ No newline at end of file