透かし入りのhtmlページを作りたいです。本体に背景画像を設定しました。ただし、背景画像がにじみ出さない要素がいくつかあります。それらは独自の background-color (background-image ではなく) を定義し、本体の色をオーバーライドします。これには驚きました。画像は上書きせず、色のみを上書きしました。
背景色が異なる要素を含むページに透かしを表示することは理にかなっているようです。
標準の html/css を使用して必要な効果を得るにはどうすればよいですか?
問題を示すサンプル コードを次に示します。透かし画像が白いブロックで覆われていることに注意してください。
<html>
<head>
<style type="text/css">
.everything
{
background: url(/images/shield-25.png) blue no-repeat center;
}
table, div{ width: 100% }
#table2 { background-color: white }
#div2 { background-color: white }
</style>
</head>
<body class="everything">
<table id="table1"><tr><td>Top</td></tr></table>
<!-- This table put a big white line over my watermark image. -->
<table id="table2"><tr><td>Middle</td></tr></table>
<table id="table3"><tr><td>Bottom</td></tr></table>
<div id="div1"><tr><td>Top</td></tr></div>
<!-- Thought maybe it was a table thing but nope, divs do it too. -->
<div id="div2"><tr><td>Middle</td></tr></div>
<div id="div3"><tr><td>Bottom</td></tr></div>
</body>
</html>