![]() ![]() This is how the startQuiz function will be: You will use the Math.Random() in a sort() function to randomly display the questions from the questions array. You will call the hide class on the start button to make it disappear immediately the user clicks on it. This function runs when you click the start button to begin your game. Question : "where can you learn how to be a better technical writer?", In there, you have to call the HTML elements you will work on into your JavaScript with the code below: This is how the root page of the app looks like at this point:įirst, create a script.js file in your app directory. Note that we also set a hide class to display: none, we will use it in JavaScript. The code above represents the styling for the answer buttons and their responsiveness to clicks when the user chooses an answer. Also, the question and answer containers contain dummy code that we will later update with JavaScript.Ĭopy and paste the following CSS code into your style.css file.įont-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif īorder: 1 px solid hsl( var( - hue), 100 %, 30 %) īackground-color: hsl( var( - hue), 100 %, 50 %) In the code above, we imported several utilities from the Tailwind CSS official website that we used in styling several components of our app. Copy and paste this CSS code in your style.css file. ![]() ![]() Also, the question and answer containers contain dummy code that we will later update with JavaScript. In the code above, we imported several utilities from the Tailwind CSS official website that we used to style several app components. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |