answers 100% CORRECT!!
1. Provide code to create a figure box containing the logo.png image file, no alt text,
and a caption with the text Tree and Book. - ANSWER<figure>
<img src="logo.png" alt="" />
<figcaption>Tree and Book</figcaption>
</figure>
2. What is the difference between a vector image and a bitmap image? - ANSWERA
vector image is expressed in terms of points joined by geometrical constructs
such as lines, and can be resized without any loss of resolution. SVG (Scaleable
Vector Graphics) images are an example of vector images.
A bitmap image is expressed by storing the colours of each individual pixel in
the image, and becomes jagged when it is increased in size (so that you can see
the individual dots). JPG, PNG, and GIF files are examples of bitmap images.
6. Create a linear gradient that moves at a 15 degree angle with the color orange
stopping at 10% of the background, yellow stopping at 50%, and green stopping
at 55%. - ANSWERlinear-gradient(15deg, orange 10%, yellow 50%, green 55%);
3. Provide the code to use the sidebar.png file as the background image for the page
body. Have the image placed in the top-left corner of the page and tiled only in the
horizontal direction. - ANSWERbody {
/* background-image: url('sidebar.png'); */
/* background-position: left top; <-- could be left out, since this is the
default setting for browsers */
/* background-repeat: repeat-x; */
/* or using the background shortcut: */
background: url('sidebar.png') left top repeat-x;
}
7. Create a radial gradient that extends to the farthest background corner, going
through the colors orange, yellow, and green. - ANSWERradial-gradient(farthest-
corner, orange, yellow, green);
4. Create a style rule for the header element that fills the header background with
tiled images of the back.png, but only over the element content. - ANSWERheader {
background-image: url('back.png');
background-repeat: repeat; /* default, so could be left out */
background-clip: content-box;
}
8. Create a repeating circular gradient of orange, yellow, and green bands centered
, at the right edge of the element with the colors stopped at 10%, 20%, and 30%
respectively. - ANSWERrepeating-radial-gradient(circle at right center, orange 10%,
yellow 20%, green 30%);
5. Provide a style rule to display the logo.png and side.png image files in the top-left
corner of the page body's background. Do not tile the logo.png image, but tile the
side.png image vertically. Design your style rule so that logo.png appears on top of
the side.png. For the rest of the page body, set the background color to ivory. -
ANSWERbody {
background: url('logo.png') top left no-repeat,
url('side.png') top left repeat-y,
ivory;
}
1. Provide the transformation to shift a page object 5 pixels to the right and 10 pixels
up. - ANSWERtransform: translate(5px, -10px);
6. Provide a style rule to add a 5-pixel dotted brown border around the aside
element. - ANSWERaside {
5px dotted brown;
}
2. Provide the transformation to reduce the horizontal and vertical size of an object
by 50%. - ANSWERtransform: scale(0.5, 0.5);
7. Provide a style rule to add a 3-pixel solid blue border around the header element
with rounded corners of 15 pixels. - ANSWERheader {
border: 3px solid blue;
border-radius: 15px;
}
3. Provide the transformation to rotate an object 30° counter-clockwise around the x-
axis. - ANSWERtransform: rotateX(-30deg);
8. Provide a style rule to add elongated corners with a 5-pixel gray inset border
around the aside element and with a horizontal radius of 10 pixels and vertical
radius of 5 pixels. - ANSWERaside {
border: 5px inset gray;
border-radius: 10px/5px;
}
4. What is the difference between using the perspective property and using the
perspective function? - ANSWERThe perspective function is only applied to one
object, while the perspective
property is applied to every object in its container.
9. Provide a style rule to use the graphic image file border.png as a solid border for
the article element. Set the size of the image slice to 30 pixels and stretch the sides
to match the sides of the element. Assume a border width of 10 pixels. -
ANSWERarticle {