2013-07-09 34 views
0

我需要設置可點擊的文本框背景圖像,所以我用div(位置:絕對)標籤上面的文本框包含圖像,但問題是圖像位於文本上方,我試圖設置圖像-1卻對圖像的z-index的落下了textarea的設置文本框的可點擊背景

#smiley { 
     position:absolute; 
     z-index:1; 
    } 

<telerik:RadPane ID="Radpane5" runat="server" Height="100%" Scrolling="None" Width="100%"> 
         <div id="smiley"> 
          <img src="https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-prn1/1013130_10200305067254687_188481208_n.jpg" alt="Smiley face" height="40" width="40"> 
         </div> 
         <telerik:RadTextBox ID="chatBox" runat="server" TextMode="MultiLine" Resize="Both" Rows="100" Width="100%" 
          EmptyMessage="type here" AutoPostBack="true" BorderStyle="None" Style="z-index:5; border: none; margin: 0 auto; outline: none"> 

          </telerik:RadTextBox> 
+0

你能告訴我你想要點擊的背景圖像後做什麼? – zey

回答

0

試試這個

HTML

<input type="text" id="smiley" /> <input type="text" id="smiley1" />

CS小號

#smiley:focus{background: red;} #smiley1:focus{background: url("http://surrey-arg.org.uk/SARG/08000-TheAnimals/Images/Prey/Small_fish.jpg");}

LINK

+0

但隨後背景圖片不可點擊... – user1610362