Question: 1 Open the index.html file in the chapter 1 0 apply folder from the Data Files in your text editor. Update the comment with
Open the index.html file in the chapterapply folder from the Data Files in your text editor. Update the comment with your name, the file name, and todays date. Add your name to the paragraph element located within the footer element near the bottom of the page.
Open the index.html file in your browser to view the page.
Update the CSS link within the head element to use the applycss file located within the applycss folder.
Open the applycss file from the applycss folder. Modify the comment at the top of the style sheet to include your name, todays date, and the file name.
Add the following comment and @keyframes rules above the footer style rule:
Unnumbered lines of H T M L code read as follows. forward slash asterisk Animation asterisk forward slash at the rateweb kitkey frames color left brace from left brace backgroundcolor colon hash f b d a e semicolon right brace to left brace backgroundcolor colon hash b semicolon right brace right brace at the rate key frames color left brace from left brace backgroundcolor colon hash f b d a e semicolon right brace to left brace backgroundcolor colon hash b semicolon right brace right brace
Insert the following declarations to the style rule for the square class selector. For each declaration, you must first include a declaration with the webkit prefix, followed by the standard declaration.
Animation name property that specifies the name of the @keyframes rule animation.
Animation duration property with a value of seconds.
Create a new style rule for the square class selector with the hover pseudoclass that specifies a transform property with translatepx as the value.
Create a script.js file and save it within the applyscripts folder. Include a multiline comment at the top of the page with your name, todays date, and the file name.
Add a single line comment with the text Function to display content.
Create the following function below the comment:
Unnumbered lines of H T M L code read as follows. function content left parenthesis right parenthesis left brace var text equals document dot get Element By I d left parenthesis left double quotation mark new right double quotation mark right parenthesis semicolon text dot text Content equals left double quotation mark Hi I am a new paragraph that was created with a JavaScript function. right double quotation mark semicolon text dot style dot color equals left double quotation mark hash c f right double quotation mark semicolon text dot style dot font Size equals left double quotation mark e m right double quotation mark semicolon right braceEnlarge Image
In the index.html file, above the closing body tag, add a script element and specify script.js as the src
Add an onclick event handler that calls the content function to the button element in the main section.
Save all of your changes and open index.html in your browser. View the animation and click the button to ensure that the content function is called and the new text is displayed.
Validate your HTML document and fix any errors that are identified.
Submit the files in a format specified by your instructor.
In this exercise, you created animation using CSS Identify another way to use the @keyframes rule to create animation with the square div element on the page.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
