问题描述
|
需要一个div来部分显示其背后的图像,这有可能吗?尝试过:
opacity:.5;
和
filter:alpha(opacity=50);
两者均产生一个可靠的div。
任何帮助将非常感激。
解决方法
从评论中纯妙的猜测中,我设法找到了一个可行的答案:
您是否尝试使用半透明
.png
?
好极了!
,是的,三十点!您必须对cfdocument表示赞赏,是吗?
我已经确认可以在CF9中使用。我确实想知道此示例是否向后兼容。
有人可以确认其他ColdFusion版本支持吗?
<cfdocument format=\"PDF\" pagetype=\"letter\"
margintop=\"0.5\" marginbottom=\"0.5\"
marginleft=\"0.5\" marginright=\"0.5\">
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html>
<head>
<style type=\"text/css\">
body { background-image: url( \"images/use_your_image.jpg\" ); }
img { border: 3px solid #990000; }
</style>
</head>
<body>
Does transparent image appear above the background repeated image?
<img src=\"images/red_transparent_100x100.png\">
<!--- Generated this at http://transparent-png-generator.com/ --->
</body>
</html>
</cfdocument>