mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
added border radius test
This commit is contained in:
parent
496c8488bd
commit
42abcfe5fc
57
tests/cases/border/radius.html
Normal file
57
tests/cases/border/radius.html
Normal file
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Borders tests</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<script type="text/javascript" src="../../test.js"></script>
|
||||
<style type="text/css">
|
||||
div {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
display: inline-block;
|
||||
margin: 10px;
|
||||
background:#6F428C;
|
||||
border-style: solid;
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.box1 {
|
||||
border-width: 1px;
|
||||
border-left-color: #00b5e2;
|
||||
border-top-color: red;
|
||||
border-right-color: green;
|
||||
}
|
||||
|
||||
.box2 {
|
||||
border-width: 3px;
|
||||
border-left-color: #00b5e2;
|
||||
border-top-color: red;
|
||||
border-right-color: green;
|
||||
}
|
||||
|
||||
.box3 {
|
||||
border-width: 10px;
|
||||
border-left-color: #00b5e2;
|
||||
border-top-color: red;
|
||||
border-right-color: green;
|
||||
}
|
||||
|
||||
.box4 {
|
||||
border-width: 50px;
|
||||
border-left-color: #00b5e2;
|
||||
border-top-color: red;
|
||||
border-right-color: green;
|
||||
}
|
||||
|
||||
html {
|
||||
background: #3a84c3;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="box1"> </div>
|
||||
<div class="box2"> </div>
|
||||
<div class="box3"> </div>
|
||||
<div class="box4"> </div>
|
||||
</body>
|
||||
</html>
|
37
tests/rangetest.html
Normal file
37
tests/rangetest.html
Normal file
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Range tests</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<style>
|
||||
#tests {
|
||||
font-family:Arial;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="tests"></div>
|
||||
<script>
|
||||
var div = document.getElementById("tests"), item, range, textNode, bounds;
|
||||
|
||||
for (var i = 6; i < 72; i++) {
|
||||
item = document.createElement("div");
|
||||
item.style.fontSize = i + "px";
|
||||
item.style.lineHeight = (10 + i * 2) + "px";
|
||||
textNode = document.createTextNode(i);
|
||||
item.appendChild(textNode);
|
||||
div.appendChild(item);
|
||||
|
||||
range = document.createRange();
|
||||
range.setStart(textNode, 0);
|
||||
range.setEnd(textNode, i.toString().length);
|
||||
bounds = range.getBoundingClientRect();
|
||||
|
||||
textNode.nodeValue += " " + bounds.height + " " + bounds.bottom + (i % 3 === 0);
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<script src="test.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user