2013-11-12 21:33:56 +04:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Background size tests</title>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
|
<script type="text/javascript" src="../../test.js"></script>
|
|
|
|
<style>
|
|
|
|
.horizontal div, .vertical div {
|
|
|
|
display: block;
|
|
|
|
background:url("../../assets/image.jpg") center center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.vertical {
|
|
|
|
float: right;
|
|
|
|
}
|
|
|
|
|
|
|
|
.horizontal {
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
|
|
|
|
.horizontal div {
|
2014-09-27 18:02:46 +04:00
|
|
|
width: 400px; height: 100px;
|
2013-11-12 21:33:56 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
.vertical div {
|
2014-09-27 18:02:46 +04:00
|
|
|
width: 200px; height: 200px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.container {
|
|
|
|
float: left;
|
|
|
|
border: 1px solid black;
|
2015-01-26 23:55:10 +03:00
|
|
|
width: 150px;
|
2014-09-27 18:02:46 +04:00
|
|
|
height: 200px;
|
|
|
|
background-image: url(../../assets/image.jpg);
|
|
|
|
background-size: 34px;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-position: center;
|
2013-11-12 21:33:56 +04:00
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
2014-09-27 18:02:46 +04:00
|
|
|
<div class="container"></div>
|
2014-09-27 19:03:18 +04:00
|
|
|
<div class="container" style="background-repeat: repeat-y"></div>
|
|
|
|
<div class="container" style="background-repeat: repeat-x"></div>
|
2015-01-26 23:55:10 +03:00
|
|
|
<div class="container" style="background-size: 150% auto"></div>
|
2013-11-12 21:33:56 +04:00
|
|
|
<div class="horizontal">
|
|
|
|
<div style='background-size: cover;'></div>
|
|
|
|
<div style='background-size: contain;'></div>
|
|
|
|
<div style='background-size: auto 100%;'></div>
|
|
|
|
<div style='background-size: auto;'></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="vertical">
|
|
|
|
<div style='background-size: cover;'></div>
|
|
|
|
<div style='background-size: contain;'></div>
|
|
|
|
<div style='background-size: auto 100%;'></div>
|
|
|
|
<div style='background-size: auto;'></div>
|
|
|
|
</div>
|
2019-05-26 01:54:41 +03:00
|
|
|
<div class="container" style="padding: 10px; background-size: contain; background-origin: content-box; background-clip: content-box"></div>
|
2013-11-12 21:33:56 +04:00
|
|
|
</body>
|
|
|
|
</html>
|