0

在此处输入图像描述

如何在“这里”的图像上放置文字?
它必须从环绕开始 20px,固定为 250px。

HTML

<div class="background-image">
    <img src="img/picture.jpg" alt="pasta-town">
    <div id="motto" class="wrap">
        <div>some motto</div>
    </div>
</div>

CSS

#motto {
font-size: 26px;
font-family: "MetaProMedium";
position: absolute; 
top:0;
}
#motto div {
left: 755px;
width: 250px;
}
.background-image {
position: relative;
width: 100%;
}
.background-image > img {
width: 100%;
}
4

1 回答 1

0

You will need to adjust the z-index for both the div containing the image and the text you want to posi The higher z-index will layer over the lower one.

于 2013-08-17T07:08:03.077 回答