【发布时间】:2011-09-22 09:30:11
【问题描述】:
我有一个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/>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
<style type="text/css">
a.button {
background: url('button.png') repeat-x;
}
a.button:hover {
background: url('button_hover.png');
}
</style>
</head>
<body>
<p><a class="button" href="#">Button</a></p>
</body>
</html>
图像button_hover.png 仅在我悬停按钮时才被下载。 I know that it is the default browser behaviour.
有什么方法可以强制下载图像吗?如果是,如何? (我宁愿不使用 JavaScript,但如果没有其他选择我可以)。
感谢和抱歉我的英语不好。
【问题讨论】: