ch04
This commit is contained in:
53
Chapter ZIPs/HTML/chapter6/origin/index.html
Normal file
53
Chapter ZIPs/HTML/chapter6/origin/index.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>CSS3 background-origin</title>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
.test { background-image: url(trilliumsolo.jpg);
|
||||
background-origin: content-box;
|
||||
background-repeat: no-repeat;
|
||||
background-position: right top;
|
||||
width: 200px;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
border: 4px solid #000;
|
||||
}
|
||||
.test1 { background-image: url(trilliumsolo.jpg);
|
||||
background-origin: padding-box;
|
||||
background-repeat: no-repeat;
|
||||
background-position: right top;
|
||||
width: 200px;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
border: 4px solid #000;
|
||||
}
|
||||
.test2 { background-image: url(trilliumsolo.jpg);
|
||||
background-origin: border-box;
|
||||
background-repeat: no-repeat;
|
||||
background-position: right top;
|
||||
width: 200px;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
border: 4px solid #000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="test">
|
||||
<h1>Trillium</h1>
|
||||
<p>
|
||||
The trillium is a spring wildflower.</p>
|
||||
</div>
|
||||
<div class="test1">
|
||||
<h1>Trillium</h1>
|
||||
<p>
|
||||
The trillium is a spring wildflower.</p>
|
||||
</div>
|
||||
<div class="test2">
|
||||
<h1>Trillium</h1>
|
||||
<p>
|
||||
The trillium is a spring wildflower.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user