Chapter 8 Adding Graphics to Web Pages
greatest cat image

Historically Opera has been best at supporting CSS, add Opera to my home computer - looks to still be true.
CSS3 Web-site generators will often generate specific code for each browser.

Review

An <img> tag is a replaced element, it uses it content to determine display type either block or inline.

body { background-image: url( URLpath ); } For local file you don't need url.

URL - Uniform Resource Locator

Image formats:

background-repeat: repeat | no-repeat | repeat-x | repeat-y | round | space;

background-position: CSS Unit or keyword [left | center | right ] [ top | center | bottom ] ; xValue yValue;
/* middle not working in y Direction on Mozilla rendering and is not on current list; default x y or just y is center */

background-attachment: fixed | scroll; fixed location in browser window;

background-origin: padding-box (default) | content-box | border-box;

May need to expand browser width, examples below have fixed height.

background-origin: border-box; image is relative to upper left of border.

background-origin: padding-box; origin is relative to the padding. This is the default value.

background-origin: content-box; origin is relative to the content; content has a height:1.5 em;

background-clip: padding-box | bounding-box (default) | content-box;

background-clip: border-box; image is clipped on border - default

background-clip: padding-box; image is clipped at end of padding.

background-clip: content-box; image is clipped to size of content, 1.5em;

background-size: cssunit | contain | cover | auto; auto maintain image perspective.

background-size: 200px 200px; .
background-size: 200px auto; square circle maintains the same size.
background-size: contain; background image is reduced in size till if fits
background-size: cover; image placed in middle center tries to fill the bounding-box; will expand image size;
background-color: orange; background-blend-mode: darken; this is not well supported; background-repeat:repeat-x More about blending - js Fiddle - note passing css3
background: short cut: background-image, background-position, background-size, background-repeat, background-origin, background-clip, background-attachment, and background-color.;

Finding images page 249

Mutliple images use background: image1url xPosition yPosition repeat, image2 url...;

padding-top:6em; background:url(images/scroll2Top.png)
center top no-repeat, url(images/scroll2Bottom.png)
center bottom no-repeat, url(images/scroll2Middle.png)
center 100px no-repeat;
background-color:black;
box-sizing:border-box;" pick good image size and make sure you have a good tile for middle;
Order of images matter, they stack so - first is on top. This may not tile well, other imag scollTop.png wrong size.
background: url(images/flourishTopRight.png) right top no-repeat,
url(images/flourishBottomLeft.png) left bottom no-repeat;
background-color: rgba(244,247,255,1.00);
just top and bottom middle is just a color or gradient; Used DW color picker to get exact match.

background-image: gradient function

Basic linear-gradient, seems to be well supported,
historically you would have to use a special function for each rendering engine.
However, modern day Web Design you need to learn how to use an ID.
background-image: linear-gradient( [angle direction], color1 [%], color2, ... colorn );
background-image: repeating-linear-gradient( red, yellow [10%], blue [10%] );
background-image: radial-gradient( [shape size, ] color1 [%], color2 [%] );
width: 90%; background: url(images/flourishTopRight.png) no-repeat right top, linear-gradient( 225deg, rgba(244,247,255,1.00), rgba(244,247,255,1.00), #8E0DE4); bottom angle is 0deg, left side is 90, top is 180, 45 more is the right top corner we repeat the first color a second time, you should make the images exterior more transparent.

Permalink Ultimate Color Generator -

CSS3 Web-site generators will often generate specific code for each browser.


Gradient is just a transition from one color to the next
DW CSS Designer is well done in Creative Cloud,
it supports linear gradient in all directions this is 270°.
Most browsers are doing better supporting CSS3 gradient function.