From ec7b78ecb642b1c843f2224a03b5f232bc4bbe33 Mon Sep 17 00:00:00 2001 From: Marina Ferreira Date: Mon, 16 Jul 2018 21:06:59 -0300 Subject: [PATCH] Video 4 --- video-4/index.html | 69 ++++++++++++++++++++++++++++++++++++++++++++++ video-4/scripts.js | 7 +++++ video-4/styles.css | 47 +++++++++++++++++++++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 video-4/index.html create mode 100644 video-4/scripts.js create mode 100644 video-4/styles.css diff --git a/video-4/index.html b/video-4/index.html new file mode 100644 index 0000000..8d8210d --- /dev/null +++ b/video-4/index.html @@ -0,0 +1,69 @@ + + + + + + Memory Game + + + + +
+
+ Aurelia + JS Badge +
+
+ Aurelia + JS Badge +
+ +
+ Vue + JS Badge +
+
+ Vue + JS Badge +
+ +
+ Angular + JS Badge +
+
+ Angular + JS Badge +
+ +
+ Ember + JS Badge +
+
+ Ember + JS Badge +
+ +
+ Backbone + JS Badge +
+
+ Backbone + JS Badge +
+ +
+ React + JS Badge +
+
+ React + JS Badge +
+
+ + + + diff --git a/video-4/scripts.js b/video-4/scripts.js new file mode 100644 index 0000000..6c68f76 --- /dev/null +++ b/video-4/scripts.js @@ -0,0 +1,7 @@ +const cards = document.querySelectorAll('.memory-card'); + +function flipCard() { + this.classList.toggle('flip'); +} + +cards.forEach(card => card.addEventListener('click', flipCard)); diff --git a/video-4/styles.css b/video-4/styles.css new file mode 100644 index 0000000..eab2383 --- /dev/null +++ b/video-4/styles.css @@ -0,0 +1,47 @@ +* { + padding: 0; + margin: 0; + box-sizing: border-box; +} + +body { + height: 100vh; + display: flex; + background: #060AB2; +} + +.memory-game { + width: 640px; + height: 640px; + margin: auto; + display: flex; + flex-wrap: wrap; +} + +.memory-card { + width: calc(25% - 10px); + height: calc(33.333% - 10px); + margin: 5px; + position: relative; + transform: scale(1); + box-shadow: 1px 1px 1px rgba(0,0,0,.3); +} + +.memory-card:active { + transform: scale(0.97); + transition: transform .2s; +} + +.memory-card.flip { + transform: rotateY(180deg); +} + +.front-face, +.back-face { + width: 100%; + height: 100%; + padding: 20px; + position: absolute; + border-radius: 5px; + background: #1C7CCC; +}