【发布时间】:2012-01-17 12:38:23
【问题描述】:
我有一个网页,它从一个 css sprite 中加载两个图像,如下所示:
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
<div class="arrow low"></div>
<div class="arrow high"></div>
</body>
</html>
css (stylesheet.css) 看起来像这样:
.arrow
{
height: 239px;
width: 260px;
background: url('logotypearrows.png') no-repeat;
}
.arrow.high
{
background-position: 10px 0px;
}
.arrow.low
{
background-position: -1003px 0px;
}
网页看起来很完美,但我无法打印。我看不到动态加载的箭头。有谁知道如何解决这个问题?我希望能够打印出箭头,并希望从 CSS 精灵中加载它们。
【问题讨论】: