【发布时间】:2012-09-25 13:37:17
【问题描述】:
我有一个应该可以打印的页面。问题是该页面包含一些带有background-image 的元素(并且我在打印时看不到图像),所以我尝试为打印机创建一个样式表,其中包含一些可以帮助我显示图像的伪元素,它看起来像:
.pbar-fill {
background: none !important;
}
.pbar-fill::before {
content: url("/images/bg-progress-bar-big01.gif") !important;
position: absolute !important;
z-index: 1003 !important;
width: 23px !important;
}
它并不顺利,因为图像总是得到它的全宽(220px)。
【问题讨论】:
标签: html css pseudo-element