CSS Property Value How to - background: #f0e68c url no-repeat fixed 250px 25px;








Question

We would like to know how to background: #f0e68c url no-repeat fixed 250px 25px;.

Answer


<!DOCTYPE html>
<html lang="en">
<head>
<title>Example of CSS background shorthand property</title>
<style type="text/css">
body {<!--from   ww w.j a  va2  s . c  o m-->
  background: #f0e68c url("http://placehold.it/20x20") no-repeat fixed 250px 25px;
}
</style>
</head>
<body>
  <h1>This is a heading</h1>
  <p>This is a paragraph.</p>
</body>
</html>

The code above is rendered as follows: