mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Add tests for background-size
This commit is contained in:
parent
7cc7f80ee2
commit
35c5ca3340
47
tests/cases/background/size.html
Normal file
47
tests/cases/background/size.html
Normal file
@ -0,0 +1,47 @@
|
||||
<!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 {
|
||||
width: 400px; height: 200px;
|
||||
}
|
||||
|
||||
.vertical div {
|
||||
width: 200px; height: 400px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<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>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user