我已经浏览了这里关于这个问题的其他几篇文章,但我仍然很难过。我最终得到了以下代码:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="jquery-1.10.1.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#promoIMG").css({
"filter": "blur(4px)",
"-webkit-filter": "blur(4px)",
"-moz-filter": "blur(4px)",
"-o-filter": "blur(4px)",
"-ms-filter": "blur(4px)",
"filter":"url('#f1')"
});
});
</script>
</head>
<body>
<div id="promoIMG"><br/>
<p>asdasdasddas</p>
<img src="excel_graph_large.png" alt="AKB" />
</div>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
<filter id="f1" x="0" y="0">
<feGaussianBlur stdDeviation="100" />
</filter>
</defs>
</svg>
</body>
</html>
它似乎在 Chrome 中工作,即按预期工作,但在 Mozilla Firefox 中没有。任何帮助将不胜感激!