现在,我希望文本在背景图像中。我想我的问题可能在我的块HTML中?
.background_grey {
height: 70px;
width: 100%;
margin-top: 0px;
position: relative;
}
.page_title {
font-size: 14px;
}
<img class="background_grey" src="images/subtle_grunge.png" />
<div class="page_title">Register <span class="hometxtcolor">an Account</span></div>
谢谢您的帮助 !
你必须通过CSS使用背景图像,而不是img元素:
.page_title {
background-image: url(images/subtle_grunge.png);
}
<div class="page_title">
Register
<span class="hometxtcolor">
an Account
</span>
</div>