CSS - właściwości background-origin


background-origin

kod wynik kodu
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<meta http-equiv="Content-Language" content="pl">
<title>Example of Setting background-origin of an Element</title>
<style>
.box_01 {
  width: 300px;
  height: 100px;
  padding: 10px;
  border: 10px dashed #333;
  background: url("grafika/obraz.png") no-repeat;
  background-size: contain;
  background-origin: border-box ;
}

.box_02 {
  width: 300px;
  height: 100px;
  padding: 10px;
  border: 10px dashed #333;
  background: url("grafika/obraz.png") no-repeat;
  background-size: contain;
  background-origin: padding-box;
}

.box_03 {
  width: 300px;
  height: 100px;
  padding: 10px;
  border: 10px dashed #333;
  background: url("grafika/obraz.png") no-repeat;
  background-size: contain;
  background-origin: content-box;
}

</style>
</head>
<body>

<div class="box_01"></div><br />
<div class="box_02"></div><br />
<div class="box_03"></div><br />

</body>
</html>