diff options
| author | Horus | 2020-10-11 22:07:46 +0200 |
|---|---|---|
| committer | Horus | 2020-10-11 22:10:04 +0200 |
| commit | 500934a229add602950fcb16219e25c14b63f5e2 (patch) | |
| tree | 3ed65fbf326217a5065ccc99ec44f9e08146f82f | |
| parent | 4e27cd2474564d170f2d992e7e4a3f9f3d5cfa20 (diff) | |
| download | pizza-500934a229add602950fcb16219e25c14b63f5e2.tar.gz | |
add hide button. colors pizza.
| -rw-r--r-- | index.html | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -16,10 +16,11 @@ .show-pizza { height: 10cm; width: 10cm; - background-color: #bbb; + background-color: #a10a09; border-radius: 50%; margin-left: 10px; margin-top: 20px; + border: 0.5cm solid #fff38a; } math { font-size: 1.5rem; @@ -31,6 +32,9 @@ .btn-tertiary:hover { filter: brightness(0.85); } + .btn-hide { + background-color: grey; + } .hidden { display: none; } @@ -50,14 +54,14 @@ </label> <div class="form-group"> <label for="d1">Durchmesser in cm:</label> - <input id="d1" class="form-control" type="float" placeholder="Durchmesser in cm"> + <input id="d1" class="form-control" type="float" placeholder="Durchmesser in cm" required> </div> <div class="form-group"> <label for="p1"> Preis in Euro: </label> - <input id="p1" class="form-control" type="float" placeholder="Preis in €"> + <input id="p1" class="form-control" type="float" placeholder="Preis in €" required> </div> <div class="form-group"> @@ -78,14 +82,14 @@ </label> <div class="form-group"> <label for="d2">Durchmesser in cm:</label> - <input id="d2" class="form-control" type="float" placeholder="Durchmesser in cm"> + <input id="d2" class="form-control" type="float" placeholder="Durchmesser in cm" required> </div> <div class="form-group"> <label for="p2"> Preis in Euro: </label> - <input id="p2" class="form-control" type="float" placeholder="Preis in €"> + <input id="p2" class="form-control" type="float" placeholder="Preis in €" required> </div> <div class="form-group"> @@ -97,6 +101,7 @@ <div class="form-group"> <button class="btn btn-primary" type="submit">Preis berechnen</button> + <button id="hide" class="btn btn-tertiary btn-hide" type="button">Verbergen -</button> </div> </form> @@ -245,6 +250,7 @@ document.getElementById('pizza' + id).style.width = d + "cm"; document.getElementById('pizza' + id).style.height= d + "cm"; + document.getElementById('pizza' + id).style.border= r + "cm solid rgb(230, 219, 128)"; document.body.style.zoom = 1.0; if ( 0 != r ) { @@ -325,6 +331,11 @@ document.getElementById('pizza-label-1').classList.remove("hidden"); document.getElementById('submit-buttons').classList.add("hidden"); }); + document.getElementById('hide').addEventListener("click", function(e){ + document.getElementById('preis2').classList.add("hidden"); + document.getElementById('pizza-label-1').classList.add("hidden"); + document.getElementById('submit-buttons').classList.remove("hidden"); + }); document.getElementById('preis2').addEventListener("submit",function(e) { e.preventDefault(); // before the code |
