Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
— |
ibex:eignungstest3aufgabe [2024/07/25 19:55] (aktuell) itbs angelegt |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | <code html> | ||
+ | < | ||
+ | <html lang=" | ||
+ | < | ||
+ | <meta charset=" | ||
+ | <meta name=" | ||
+ | < | ||
+ | <link rel=" | ||
+ | <link rel=" | ||
+ | <link rel=" | ||
+ | <link rel=" | ||
+ | <link rel=" | ||
+ | <link rel=" | ||
+ | <link rel=" | ||
+ | <link rel=" | ||
+ | |||
+ | < | ||
+ | |||
+ | </ | ||
+ | < | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | <div class=" | ||
+ | <img src=" | ||
+ | Währungsrechner | ||
+ | </ | ||
+ | <div class=" | ||
+ | <img class=" | ||
+ | <input type=" | ||
+ | <span class=" | ||
+ | <span class=" | ||
+ | </ | ||
+ | <div class=" | ||
+ | <img src=" | ||
+ | </ | ||
+ | <div class=" | ||
+ | <img class=" | ||
+ | <input type=" | ||
+ | <span class=" | ||
+ | <span class=" | ||
+ | </ | ||
+ | |||
+ | <div class=" | ||
+ | <button onclick=" | ||
+ | <button onclick=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | <code css> | ||
+ | body { | ||
+ | background-color: | ||
+ | margin: 0; | ||
+ | |||
+ | color: rgb(224, 255, 48); | ||
+ | font-size: 28px; | ||
+ | |||
+ | /* font-family: | ||
+ | font-family: | ||
+ | font-optical-sizing: | ||
+ | font-weight: | ||
+ | font-style: | ||
+ | |||
+ | } | ||
+ | div { | ||
+ | background-color: | ||
+ | min-height: | ||
+ | margin-bottom: | ||
+ | } | ||
+ | .kopf { | ||
+ | min-height: | ||
+ | padding: 16px; | ||
+ | display: flex; | ||
+ | align-items: | ||
+ | gap: 16px; | ||
+ | background-color: | ||
+ | /* background-color: | ||
+ | /* position: relative; */ | ||
+ | } | ||
+ | .flags { | ||
+ | position: absolute; | ||
+ | left:45px; | ||
+ | width: 50px; | ||
+ | |||
+ | } | ||
+ | .currency { | ||
+ | position: absolute; | ||
+ | right: 80px; | ||
+ | font-weight: | ||
+ | /* bottom: 20px; */ | ||
+ | } | ||
+ | .currency2 { | ||
+ | position: absolute; | ||
+ | right: 30px; | ||
+ | font-weight: | ||
+ | color: darkolivegreen; | ||
+ | font-size: medium; | ||
+ | bottom: 15px; | ||
+ | } | ||
+ | input { | ||
+ | height: 60px; | ||
+ | background-color: | ||
+ | border-radius: | ||
+ | flex: 1; | ||
+ | /* padding-left: | ||
+ | text-align: | ||
+ | padding-right: | ||
+ | color: rgb(70, 252, 161); | ||
+ | font-size: larger; | ||
+ | } | ||
+ | .container { | ||
+ | background-color: | ||
+ | display: flex; | ||
+ | justify-content: | ||
+ | align-items: | ||
+ | padding: 1px 15px; | ||
+ | /* gap:10px; */ | ||
+ | position: relative; | ||
+ | } | ||
+ | button { | ||
+ | background-color: | ||
+ | font-size: 14px; | ||
+ | color: #0d72f5; | ||
+ | font-weight: | ||
+ | /* flex:1; */ | ||
+ | width: 40%; | ||
+ | justify-content: | ||
+ | /* gap:10px; */ | ||
+ | padding: 10px 42px; | ||
+ | margin: 0 10px; | ||
+ | height: 50px; | ||
+ | border: unset; | ||
+ | border-radius: | ||
+ | box-shadow: | ||
+ | cursor: pointer; | ||
+ | } | ||
+ | #umrechnung { | ||
+ | transform: rotate(180deg); | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | ---- | ||
+ | <code javascript> | ||
+ | let rotated = true; | ||
+ | const EDKURS = 1.0848;// 25.07.2024 | ||
+ | function calcD() { | ||
+ | let euro = txtvar1.value.replace(',',' | ||
+ | let result = euro * EDKURS; | ||
+ | console.log(result); | ||
+ | try{ | ||
+ | txtvar2.value = result.toFixed(2).replace(' | ||
+ | }catch(e){ | ||
+ | console.error(e); | ||
+ | txtvar2.value = result.toFixed(2); | ||
+ | } | ||
+ | |||
+ | let u = document.getElementById(" | ||
+ | u.style.transform = ' | ||
+ | rotated = true; | ||
+ | u.setAttribute(" | ||
+ | } | ||
+ | function calcE() { | ||
+ | let doller = txtvar2.value.replace(',',' | ||
+ | let result = doller / EDKURS; | ||
+ | try { | ||
+ | txtvar1.value = result.toFixed(2).replace(' | ||
+ | }catch(e){ | ||
+ | console.error(e); | ||
+ | txtvar1.value = result.toFixed(2); | ||
+ | } | ||
+ | |||
+ | let u = document.getElementById(" | ||
+ | u.style.transform = ' | ||
+ | rotated = false; | ||
+ | u.setAttribute(" | ||
+ | } | ||
+ | |||
+ | |||
+ | function umrechnungDrehen() { | ||
+ | const compStyles = window.getComputedStyle(umrechnung); | ||
+ | let transform | ||
+ | // | ||
+ | let u = document.getElementById(" | ||
+ | if(rotated == true){ | ||
+ | u.style.transform = ' | ||
+ | u.setAttribute(" | ||
+ | }else{ | ||
+ | u.style.transform = ' | ||
+ | u.setAttribute(" | ||
+ | } | ||
+ | rotated = !rotated; | ||
+ | transform | ||
+ | // | ||
+ | } | ||
+ | </ |