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中,然後發佈鏈接,以便更好地瞭解你的上下文代碼,以查看導致錯誤的原因。 –
我也嘗試過兩種方法,但它對代碼沒有任何影響,但是我固定它就像這樣,即使它是一種硬編碼,但它起作用,所以我不會碰它 –