2011-06-20 41 views

回答

4

您可以添加兩個按鈕並使用背景圖像並將邊距設置爲0,以便它們幾乎看起來像一個按鈕。

+0

簡單地使用負邊距我能夠得到我想要的效果。謝謝 –

0

首先回答沒有。 但你可以把兩個標籤組合在一起具有相同的按鈕類型的視圖。將兩個標籤(或任何其他視圖)放在相同的佈局中。設置該佈局的偵聽器。

-2

您可以在地圖部分使用圖像,並且每個部分都會執行不同的JavaScript。 圖像將充當具有不同目標動作的按鈕。

例如看代碼here

<img src ="planets.gif" width ="145" height ="126" alt="Planets" usemap="#planetmap" /> 

<map name="planetmap"> 
<area shape ="rect" coords ="0,0,82,126" 
onmouseover="writeText('The Sun and the gas giant planets like Jupiter are by far the largest objects in our Solar System.')" 
href ="sun.htm" target ="_blank" alt="Sun" /> 

<area shape ="circle" coords ="90,58,3" 
onmouseover="writeText('The planet Mercury is very difficult to study from the Earth because it is always so close to the Sun.')" 
href ="mercur.htm" target ="_blank" alt="Mercury" /> 

<area shape ="circle" coords ="124,58,8" 
onmouseover="writeText('Until the 1960s, Venus was often considered a twin sister to the Earth because Venus is the nearest planet to us, and because the two planets seem to share many characteristics.')" 
href ="venus.htm" target ="_blank" alt="Venus" /> 
</map> 
+1

This isnt android –

2

沒有,但你可以創建一個看起來像一個按鈕,兩個按鈕。將兩個按鈕放在右邊。創建一個覆蓋兩個按鈕的位圖圖像。將圖像剪成一半。將按鈕的背景圖像設置爲兩個位圖。

相關問題