Backgrounds and Borders Flashcards
Background property and value that will not repeat the image.
background-repeat: no-repeat;
Position the background image to be vertically and horizontally centered.
background-position: center;
background-attachment: _____; does not allow a background image to scroll with its containing element, but it will scroll when the element’s content scrolls.
local
background-attachment: _____; does not allow a background image to scroll with the content on the page
fixed
T/F: Rounded corners are formed from the radius of a quarter circle, and elliptical corners are formed from the radius of a quarter ellipse.
True
When two border values are defined in the shorthand property:
the first value is applied to top-left and bottom-right corners, and the second value is applied to the top-right and bottom-left corners
If 2 values are used for 1 corner, the first value is the _ _ _ _ radius and the second is the _ _ _ _ radius.
horizontal, vertical
Using the border-radius shorthand, give each corner of a div a horizontal radius of 100px and a vertical radius of 50px.
border-radius: 100px / 50px;
Create a drop shadow for a div. Make it appear 10px to the right and 10px down, with a spread radius of 5px, a color of #222, and a blur radius of 15px.
box-shadow: 10px 10px 15px 5px #222;
box-shadow: x-axis y-axis blur spread color
What value places a box-shadow inside the element?
inset
We have an image file, ‘smiley.png’, located in the ‘img’ folder. Set it so that it doesn’t repeat, and position it in the top-right corner of the div. Then, add ‘img/pencil.png’ above the smiley image layer. Set it so that it doesn’t repeat, and position it in the bottom-left corner.
background: url(“img/pencil.png”) no-repeat left bottom, url(“img/smiley.png”) no-repeat right top
What is the function of the “background-clip” property?
it determines whether the background position is relative to the border, padding, or content area of the element
In a comma-separated list of backgrounds, where is the best place for an opaque image or color?
last
T/F: “background-size: contain;” will scale an image so that it fits entirely inside the background area, while keeping its original aspect ratio.
True
What best describes “background-size: cover;”?
it adjusts a background image to fill the entire background positioning area and scales it so that both its width and height can display proportionately