Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Position the background image on the padding box.
According to CSS2.1 spec, background image should be positioned on padding box. Spec: http://www.w3.org/TR/CSS21/colors.html#propdef-background-position Fixes #6034.
- Loading branch information
1 parent
b3b9dea
commit 7283f75
Showing
3 changed files
with
49 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
div { | ||
background-image: url("test.jpeg"); | ||
width: 420px; | ||
height: 298px; | ||
border-width: 10px 20px 30px 40px; | ||
border-style: solid; | ||
border-color: red; | ||
padding: 40px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div></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,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
div { | ||
width: 560px; | ||
height: 418px; | ||
background-color: red; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
|
||
<div> | ||
<!-- Image dimension is 500x378. --> | ||
<img src="test.jpeg" style="position:relative; left:40px; top:10px;"> | ||
</div> | ||
|
||
</body> | ||
</html> | ||
|