servo/tests/wpt/css-tests/css-backgrounds-3_dev/xhtml1print/ttwf-reftest-background-repeat-x.xht

76 lines
No EOL
2.3 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>CSS Transforms Test: transform property with translate function</title>
<link href="mailto:77765477@163.com" rel="author" title="zhenyu_w3c" />
<link href="http://www.w3.org/TR/css3-background/#the-background-repeat" rel="help" />
<link href="reference/ttwf-reftest-background-repeat-x-ref.xht" rel="match" />
<meta content="You should only see the img with two color render on the X directions." name="assert" />
<style type="text/css">
table{
font-size:12px;
}
th{
height:160px;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='support/table-head.jpg',sizingMethod='scale'); background-repeat: repeat-x;
/*background:url(support/table-head.jpg) repeat-x;*/
border-width:0px;
}
</style>
<script>
var filter=true;
var obj_array=document.getElementsByTagName("th");
function switch_filter(){
if(filter){
for(i=0;i&lt;obj_array.length;i++){
obj_array[i].style.filter="";
obj_array[i].style.background="url(support/table-head.jpg) repeat-x";
}
var button=document.getElementById("switch-button");
button.value="has use the pure repeat-x.click here to cancel repeat-x,to use filter!!!";
filter=false;
}
else{
for(i=0;i&lt;obj_array.length;i++){
obj_array[i].style.background="";
obj_array[i].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='support/table-head.jpg',sizingMethod='scale'); background-repeat: repeat-x";
}
var button=document.getElementById("switch-button");
button.value="has used the filter.click here to cancel filter,to use pure repeat-x!!!";
filter=true;
}
}
</script></head>
<body>
<p>The test passes if you see the img repeat on the X direction (not repeat on the Y direction) </p>
<div><input type="button" value="has used the filter.click here to cancel filter,to use pure repeat-x!!!" onclick="switch_filter()" id="switch-button" /></div>
<table>
<tbody><tr>
<th>
first
</th>
<th>
second
</th>
<th>
third
</th>
</tr>
<tr>
<td>
1
</td>
<td>
2
</td>
<td>
3
</td>
</tr>
</tbody></table>
</body></html>