Question

In: Computer Science

Use external CSS and Javascript files. Use the HTML5 elements to layout the page. In a...

Use external CSS and Javascript files.

Use the HTML5 elements to layout the page.

In a sidebar include an advertisement that changes its image every three seconds. The can be created in paint and be very simple or more detailed.

Solutions

Expert Solution

Slidebar.html

<html>
<head>  
    <link href="slidebar.css" rel="stylesheet" type="text/css"> <!-- link css file -->
    
    <body>
        <center><h1>Sidebar</h1></center><!-- h1 heading tag and center tag for center alignment-->
          <center> <div id="ad" name="ad"><!-- create division to store ad in it -->
            <div id="sliderbox"><!-- create a div -->
           <a href="#" target="_blank"><img   src="ad1.png"  > </a> <!-- write image tag within the <a> tag to make image clikable--> 
                   <a href="#" target="_blank">  <img   src="ad2.jpg"  > </a><!-- write image tag within the <a> tag to make image clikable-->
                   <a href="#" target="_blank"><img   src="ad3.jpg"  > </a> <!-- write image tag within the <a> tag to make image clikable--> 
               <a href="#" target="_blank">  <img   src="ad2.jpg"  > </a><!-- write image tag within the <a> tag to make image clikable-->
                
                   
                 </div><br clear="all"><!-- clear extra spaces-->

        </div></center> 
    </body><!--close body tag-->
    </head><!--close head tag-->
</html><!--close html tag-->

slidebar.css

   
            @keyframes slider{/*create a animation for silde images (he @keyframes rule specifies the animation code)*/
                /* from 0% to 20% show image one */ 
                0%{
                    left:0px;
                }    
               
                20%{
                    left:0px;
                }
                 /* at 25 % slide image in left side by -950 px (Image dimention: 950*475) */
                25%
                {
                    left:-950px;
                }
                /* at 45 % slide image in left side by -950 px (Image dimention: 950*475) */
                45%
                {
                   left:-950px; 
                }
                /* at 50 % slide image in left side by -1900px (950+950=1900) (Image dimention: 950*475) */
                50%{
                    left:-1900px
                }
                /* at 70 % slide image in left side by -1900px (950+950=1900) (Image dimention: 950*475) */
                70%{
                    left:-1900px;
                }
                /* at 75 % slide image in left side by -2850px (950+950+950=2850) (Image dimention: 950*475) */
                75%{
                    left:-2850px;
                }
             
            
            }
    #sliderbox{/* style the sliderbox division*/
            position: relative;/* make position relative */
            width: 4000px;/* create a width 4000px */
            animation-name: slider;/* appy slider animation to it */
            animation-duration: 15s;/* make animation duration 15s */
            animation-iteration-count: infinite;/* run inimation infinite times */
        
            
        }
        #sliderbox img{/* style image which is placed in the sliderbox division*/
            float:left;/* make it left (remove extra lines and space)*/
        }
        #ad{/* style ad division */
            overflow: hidden;/*hide the overflow, So that only one image shown at a time*/
            width: 950px;/* make a width same as image size (Image dimention: 950*475) */
            background-color: aqua;/* give some background color */
            margin-left: 50px;/* give space from left side */
            margin-top: 80px;/* give space from top */
        }
img{/*Style image*/
        height: 300px;/* set height to 300 px */
        width: 950px;/* set width to 950 px */
    }
      

Output 1:

Output 2:

Saved file in system :

ad.png:

ad2.png

ad3.png

Note: Image dimention: 950*475


Related Solutions

Use external CSS and Javascript files Use the HTML5 elements to layout the page. Have a...
Use external CSS and Javascript files Use the HTML5 elements to layout the page. Have a bulleted list and 3 paragraphs this can be loren ipsum. Have the information text fade in when the page is done loading. Stagger the animations so that the text that is higher up on the page fades in before. Add three more animations in addition to the ones above including an interval timer based animation, an event based animation click or hover, and an...
Build a web page using an external CSS file based on the following specifications : a)...
Build a web page using an external CSS file based on the following specifications : a) The page must have a breaking point at 768px (desktop/mobile). b) The three sections contents (header, main and footer) must be full-width and no larger than 960px (horizontally centered block). Ma c) Header must be 80px high, full width and fixed and will show your name on the left /5 side. The burger icon should appear when the browser’s window is 768px or lower....
Calculator in JavaScript. No use of switch statements or CSS. Project Standards: Students will use click...
Calculator in JavaScript. No use of switch statements or CSS. Project Standards: Students will use click events to capture user input. Students will use variables to store information needed by their application and keep track of their program’s state. Students will use conditionals to control project flow. Project Task You will be building a simple calculator in the browser. It should be able to add, subtract, divide, and multiply. Your program should do the following: Display a standard calculator to...
use CSS, java and HTML to make a charity admin page. It's a web page after...
use CSS, java and HTML to make a charity admin page. It's a web page after you log in to your account. I can have personal information, the amount of money donated, the children who have received charity, and some blogs. In fact, all the things are what I want. But you are free to do whatever You like, even if you don't say what I say. I just need a charity Admin page for charity User.Don't ask me for...
use CSS, java and HTML to make a charity admin page. It's a web page after...
use CSS, java and HTML to make a charity admin page. It's a web page after you log in to your account. I can have personal information, the amount of money donated, the children who have received charity, and some blogs. In fact, all the things are what I want. But you are free to do whatever You like, even if you don't say what I say. I just need a charity Admin page for charity User.Don't ask me for...
use CSS, java and HTML to make a charity admin page. It's a web page after...
use CSS, java and HTML to make a charity admin page. It's a web page after you log in to your account. I can have personal information, the amount of money donated, the children who have received charity, and some blogs. In fact, all the things are what I want. But you are free to do whatever You like, even if you don't say what I say. I just need a charity Admin page for charity User.Don't ask me for...
use CSS, java and HTML to make a charity admin page. It's a web page after...
use CSS, java and HTML to make a charity admin page. It's a web page after you log in to your account. I can have personal information, the amount of money donated, the children who have received charity, and some blogs. In fact, all the things are what I want. But you are free to do whatever You like, even if you don't say what I say. I just need a charity Admin page for charity User.Don't ask me for...
use CSS, java and HTML to make a charity admin page. It's a web page after...
use CSS, java and HTML to make a charity admin page. It's a web page after you log in to your account. I can have personal information, the amount of money donated, the children who have received charity, and some blogs. In fact, all the things are what I want. But you are free to do whatever You like, even if you don't say what I say. I just need a charity Admin page for charity User.Don't ask me for...
use CSS, java and HTML to make a charity admin page. It's a web page after...
use CSS, java and HTML to make a charity admin page. It's a web page after you log in to your account. I can have personal information, the amount of money donated, the children who have received charity, and some blogs. In fact, all the things are what I want. But you are free to do whatever You like, even if you don't say what I say. I just need a charity Admin page for charity User.Don't ask me for...
This needs to be written in JavaScript with two files. One HTML file and a JavaScript...
This needs to be written in JavaScript with two files. One HTML file and a JavaScript file. Make an empty HTML file, put three buttons inside the body and an empty main tag below the buttons. The text of the buttons should be "Foo", "Bar", and "FooBar" respectively. Don't put the " in the buttons that's just for clarification in these instructions. Add unique IDs to each button In your JavaScript, get 3 separate references to the buttons using the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT