【发布时间】:2018-08-15 02:37:25
【问题描述】:
我有以下代码,我想在图像上放置一个文本框。文字覆盖了图像,但是当我将背景颜色设置为白色时,它仍然显得透明。我以前做过这个,但由于某种原因它在这里不起作用。任何帮助将不胜感激。
<section>
<h1 style="margin-left: 10%;">Blah, blah</h1>
<img src="_images/some.jpg" style="margin-left: 10%; width: 60%;" >
<section style="margin-left: 45%; margin-top: -35%; background-color: #FFF; padding: 1em; width: 20%;">
<p style="font-size: 2em; margin-top: -5%;">More blah, blah.</p>
<p style="font-size: 1.2em; ">Even more blah, blah.</p>
</section>
</section>
【问题讨论】:
标签: html css background-color