Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement 'background-origin' property in CSS3 Background
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.
- Loading branch information
1 parent
b05c3fc
commit b1b22c0
Showing
7 changed files
with
119 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
#foo1 { | ||
background: url(400x400_green.png); | ||
background-repeat: no-repeat; | ||
width: 400px; | ||
height: 400px; | ||
padding: 20px; | ||
border: 20px dotted red; | ||
} | ||
#foo2 { | ||
background: url(400x400_green.png); | ||
background-position: -20px -20px; | ||
background-repeat: no-repeat; | ||
width: 400px; | ||
height: 400px; | ||
padding: 20px; | ||
border: 20px dotted red; | ||
} | ||
#foo3 { | ||
background: url(400x400_green.png); | ||
background-position: 20px 20px; | ||
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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters