css如何画表格斜线

<div id="ss" style="margin:0px;padding:0px;height:100px;width:100px;border:1px solid;position:relative;top:50px;left:340px;">
Co
</div>
<script type="text/javascript">
document.body.style.margin="0px";  
document.body.style.padding="0px";
var object=ss; 
var start=object.style.posLeft;
var end=object.offsetWidth+object.style.posLeft;
for(var x=start;x<end;x++)
{   y=((x-object.style.posLeft)/(object.offsetWidth)*(object.offsetHeight))+object.style.posTop;
document.write("<div style=width:1px;height:1px;background:black;overflow:hidden;position:absolute;left:"+parseInt(x)+";top:"+parseInt(y)+";></div>");
}
</script> 

你可能感兴趣的:(css)