Coding Challenge #8 - Flash Cards
Key Takeaways
This video demonstrates how to create a flash card effect using HTML, CSS, and JavaScript, where a card spins around when clicked to show its back side.
Full Transcript
all right then my friends so in this challenge what I'd like you to do is to create a flash card which spins around or rotates around when you click on it so you can see right here we have this card with some text on get 50 off net Ninja Pro when we click on this it's gonna spin around to show you the back of the card which has the promo code ninja fledgling when you click on it again it's gonna rotate back around to the front so this is the kind of effect I'd like you to try and do in this challenge now I have prepped and created some starter files for this Challenge and you can find them on the coding challenges repo I will leave this link down below the video to get the starter files go down to the branch drop down and you need to scroll right down to challenge 8 start and then right here you can see we've got three files the HTML file JavaScript and CSS so download these go to code and then go to download zip click on that it will download a zip folder just unzip that and open it up in a text editor so once you open up those data files something like this we have the HTML file right here which is a really really simple template just an H1 then a section down here which is all the stuff we're concerned with so inside the section tag we have a div with a class of card then inside that we have a div for the front with a classic front that's the front of the card content and then this is the back stuff right here with the class of back now you don't need to change the HTML one bit this is how it should look at the end according to my solution but if you want to change it that's absolutely fine there's no one set way of doing this you just approach this however way you want to but you don't have to change it so that's the HTML file we're linking to a styles.css file and also an index.js file as well now there will be a little bit of JavaScript involved just to listen to that click event and you can put that inside here empty at the minute the styles.css file that it's linked up to just has a few basic Styles we load in the pop-ins font family and we apply that right here to every element strip out the margin and padding of every element then for the body we give a background color of dark gray text aligned to the center a bit of padding and a text color of white then the card which is this thing right here this div we say the position is relative the width is 300 pixels height is 300 pixels a bit of margin top and bottom also left and right and then text align to the center so at the minute if we preview this it's going to look like this in the browser not much styling this is the front of the card this is the back but remember we only want to show one of those at a time so have a good go at this try and make it so this shows to begin with then when you click on the card it flips around and shows this on the back okay and again there are multiple ways of doing this I'm going to be posting my solution very soon
Original Description
📂🥷🏼 Access the starter files on GitHub:
https://github.com/iamshaunjp/Coding-Challenges/tree/challenge-8-start
🚀🥷🏼 Get access to all free & PREMIUM courses on Net Ninja Pro:
https://net-ninja-pro.teachable.com/p/net-ninja-pro/
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Net Ninja · Net Ninja · 0 of 60
← Previous
Next →
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Regular Expressions (RegEx) Tutorial #14 - Matching a Username
Net Ninja
Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
Net Ninja
Regular Expressions (RegEx) Tutorial #16 - Finishing Touches
Net Ninja
GraphQL Tutorial #1 - Introduction to GraphQL
Net Ninja
GraphQL Tutorial #2 - A Birdseye View of GraphQL
Net Ninja
GraphQL Tutorial #3 - Project (stack) Overview
Net Ninja
GraphQL Tutorial #4 - Making Queries (front-end preview)
Net Ninja
GraphQL Tutorial #5 - Express App Setup
Net Ninja
GraphQL Tutorial #6 - Setting up GraphQL
Net Ninja
GraphQL Tutorial #7 - GraphQL Schema
Net Ninja
GraphQL Tutorial #8 - Root Query
Net Ninja
GraphQL Tutorial #9 - The Resolve Function
Net Ninja
GraphQL Tutorial #10 - Testing Queries in Graphiql
Net Ninja
GraphQL Tutorial #11 - GraphQL ID Type
Net Ninja
GraphQL Tutorial #12 - Author Type
Net Ninja
GraphQL Tutorial #13 - Type Relations
Net Ninja
GraphQL Tutorial #14 - GraphQL Lists
Net Ninja
GraphQL Tutorial #15 - More on Root Queries
Net Ninja
GraphQL Tutorial #16 - Connecting to mLab
Net Ninja
GraphQL Tutorial #17 - Mongoose Models
Net Ninja
GraphQL Tutorial #18 - Mutations
Net Ninja
GraphQL Tutorial #19 - More on Mutations
Net Ninja
GraphQL Tutorial #20 - Updating the Resolve Functions
Net Ninja
GraphQL Tutorial #21 - GraphQL NonNull
Net Ninja
GraphQL Tutorial #22 - Adding a Front-end
Net Ninja
GraphQL Tutorial #23 - Create React App
Net Ninja
GraphQL Tutorial #24 - Book List Component
Net Ninja
GraphQL Tutorial #25 - Apollo Client Setup
Net Ninja
GraphQL Tutorial #26 - Making Queries from React
Net Ninja
GraphQL Tutorial #27 - Rendering Data in a Component
Net Ninja
GraphQL Tutorial #28 - Add Book Component
Net Ninja
GraphQL Tutorial #29 - External Query File
Net Ninja
GraphQL Tutorial #30 - Updating Component State
Net Ninja
GraphQL Tutorial #31 - Composing Queries
Net Ninja
GraphQL Tutorial #32 - query variables
Net Ninja
GraphQL Tutorial #33 - Re-fetching Queries
Net Ninja
GraphQL Tutorial #34 - Book Details Component
Net Ninja
GraphQL Tutorial #36 - Styling the App
Net Ninja
GraphQL Tutorial #35 - Making a Single Query
Net Ninja
Build Apps with Vue & Firebase - Udemy Course
Net Ninja
Updated Vue & Firebase Course (Udemy)
Net Ninja
Vue & Firebase Real-time Chat (Preview) #1 - Intro
Net Ninja
Vue & Firebase Real-time Chat (Preview) #2 - Project Structure
Net Ninja
Vue & Firebase Real-time Chat (Preview) #3 - Firestore Setup
Net Ninja
Vue & Firebase Real-time Chat (Preview) #4 - Welcome Screen
Net Ninja
Vue & Firebase Real-time Chat (Preview) #5 - Props in Routes
Net Ninja
Vue & Firebase Real-time Chat (Preview) #6 - Route Guards
Net Ninja
Vue & Firebase Real-time Chat (Preview) #7 - Chat Window
Net Ninja
Vue & Firebase Real-time Chat (Preview) #8 - New Message Component
Net Ninja
Object Oriented JavaScript Tutorial #1 - Introduction
Net Ninja
Object Oriented JavaScript Tutorial #2 - Object Literals
Net Ninja
Object Oriented JavaScript Tutorial #3 - Updating Properties
Net Ninja
Object Oriented JavaScript Tutorial #4 - Classes
Net Ninja
Object Oriented JavaScript Tutorial #5 - Class Constructors
Net Ninja
Object Oriented JavaScript Tutorial #6 - Class Methods
Net Ninja
Object Oriented JavaScript Tutorial #7 - Method Chaining
Net Ninja
Object Oriented JavaScript Tutorial #8 - Class Inheritance
Net Ninja
Object Oriented JavaScript Tutorial #9 - Constructors (under the hood)
Net Ninja
Object Oriented JavaScript Tutorial #10 - Prototype
Net Ninja
Object Oriented JavaScript Tutorial #11 - Prototype Inheritance
Net Ninja
More on: JavaScript Fundamentals
View skill →Related Reads
📰
📰
📰
📰
75 Days of Leetcode — Day 4: #238 — Product of Array Except Self
Medium · AI
I implemented the algorithm that broke the sorting barrier. Dijkstra still wins.
Medium · Programming
I implemented the algorithm that broke the sorting barrier. Dijkstra still wins.
Medium · Python
Practice Algorithms and DS the Structured Way
Medium · Programming
🎓
Tutor Explanation
DeepCamp AI