我有以下 javascript 代码:
$(document).ready(function() {
var paper = new Raphael(document.getElementById('canvas_container'), 1000, 1000);
var tetronimo = paper.path("M 700 700 l 0 -50 l -50 0 l 0 -50 l -50 0 l 0 50 l -50 0 l 0 50 z");
tetronimo.attr({
gradient: '90-#526c7a-#64a0c1',
stroke: '#3b4449',
'stroke-width': 10,
'stroke-linejoin': 'round',
rotation: -90
});
});
HTML在这里:
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Raphael Test</title>
<script type="text/javascript" src="js/libs/jquery.js"></script>
<script type="text/javascript" src="js/libs/raphael.js"></script>
<script type="text/javascript" src="js/test.js"></script>
<link href="css/screen.css" rel="stylesheet" />
</head>
<body>
<div id="canvas_container"></div>
</body>
</html>
它适用于许多浏览器,但渐变背景不适用于 IE7 和 IE8。有什么办法可以解决它?