0
我在div
中使用图像作为文本框,并且该图像上有一个边框/浮雕图案,因此文本覆盖了该部分,看起来很糟糕,所以我想定位文本CCA 15个像素的权利,但不管我试过不行将文本定位在文本框中的背景图片
HTML:
<div id=textarea>
<h2> Tardis -time music festival </h2>
<p>
<br/> Hello fellow time travelers,
<br/> Do you enjoy Music as much as Time travel?
<br/> If you do this is the right festival for you!
<br/> You don't even have to travel, we come to you,
<br/> And take you tot he biggest time adventure of your life!!
<br/> experience birth of music, the first rock song and much much more.
</p>
</div>
和css:
#textarea{
background-image:url(images/text.png);
background-repeat:no-repeat;
border:none;
width: 910px;
height:300px;
color:#CAAA5B;
padding:3px;
margin-right:4px;
margin-bottom:8px;
float:right;
}
出于某种原因,没有工作,我相当convinved我的CSS有个性,讨厌我现在出于某种原因,但我在整个p标签 –
@TrogdoraOresic填充固定它:你有没有尝试两个例子?同时将你的上下文代码粘贴到http://jsfiddle.net/的jsfiddle中,然后发布链接,以便更好地了解你的上下文代码,以查看导致错误的原因。 –
我也尝试过两种方法,但它对代码没有任何影响,但是我固定它就像这样,即使它是一种硬编码,但它起作用,所以我不会碰它 –