mirror of
https://github.com/servo/servo.git
synced 2025-06-19 14:48:59 +01:00
This property determines the background positioning area, that is the position of the origin of an image specified using the 'background-image' CSS property. 'background-origin' is ignored when background-attachment is fixed. Spec: http://dev.w3.org/csswg/css-backgrounds-3/#background-origin Fixes #6045.
40 lines
753 B
HTML
40 lines
753 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
#foo1 {
|
|
background: url(400x400_green.png);
|
|
background-origin: padding-box;
|
|
background-repeat: no-repeat;
|
|
width: 400px;
|
|
height: 400px;
|
|
padding: 20px;
|
|
border: 20px dotted red;
|
|
}
|
|
#foo2 {
|
|
background: url(400x400_green.png);
|
|
background-origin: border-box;
|
|
background-repeat: no-repeat;
|
|
width: 400px;
|
|
height: 400px;
|
|
padding: 20px;
|
|
border: 20px dotted red;
|
|
}
|
|
#foo3 {
|
|
background: url(400x400_green.png);
|
|
background-origin: content-box;
|
|
background-repeat: no-repeat;
|
|
width: 400px;
|
|
height: 400px;
|
|
padding: 20px;
|
|
border: 20px dotted red;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id=foo1></div>
|
|
<div id=foo2></div>
|
|
<div id=foo3></div>
|
|
</body>
|
|
</html>
|
|
|