background img local code example

Example 1: background image

div {
  background-color: #ffffff;
  background-image: url("img_tree.png");
  background-repeat: no-repeat;
  background-attachment: scroll|fixed|local|initial|inherit;
  background-position: right top  |  x% y%  |  xpos ypos;
  background-clip: border-box|padding-box|content-box|initial|inherit;
  background-size: auto|length|cover|contain|initial|inherit;
}
//shorthand:
div {
  background: #ffffff url("img_tree.png") no-repeat right top;
}

Example 2: image urol in src local image

<!DOCTYPE html>
<html>
   <head>
      <title>
         HTML img tag
      <title>
   </head>

   <body>
      <img src="file:/D:/images/logo.png" alt="Site Logo" width="50" height="50">
   </body>
</html>

Tags:

Misc Example