-3
A
回答
1
使用下面的代碼,希望這代碼有幫助
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<style type="text/css">
body{
margin: 0 auto;
padding: 0;
width: 100%;
max-width: 1280px;
}
.btn1,.btn2,.btn3,.btn4 {
color: black;
width: 80px;
height: 28px;
text-align: left;
position: absolute;
font-size: 12px;
cursor: pointer;
background-color: Transparent;
z-index: 1;
text-align: center;
}.btn1{
top: 18%;
left: 27%;
}.btn2{
top: 18%;
left: 41%;
}.btn3{
top: 18%;
left: 54%;
}.btn4{
top: 18%;
left: 66%;
}
img {
display: block;
left: 0;
position: absolute;
z-index: 1;
}
</style>
</head>
<body>
<img src="WD4yq.jpg" alt="title"/>
<button class="btn1">Test1</button>
<button class="btn2">Test2</button>
<button class="btn3">Test3</button>
<button class="btn4">Test4</button>
</body>
</html>
0
如果你想要的按鈕在那裏的形象,你這樣做:
<button style='margin-left: ***px;'>
<button style='margin-left: ***px;'>
<button style='margin-left: ***px;'>
<button style='margin-left: ***px;'>
我希望這回答了你的問題
相關問題
- 1. 對齊圖像按鈕與背景android
- 2. 對齊內容與背景圖像
- 3. 對齊表格 - 輸入字段/按鈕的背景圖像
- 4. 如何使背景圖像與填充對齊?
- 5. 將背景圖像相對於其他背景圖像對齊
- 6. WPF按鈕與外部背景圖像
- 7. 圖像在背景按鈕
- 8. 圖像視圖與按鈕不對齊
- 9. 對齊背景圖像中,中心
- 10. 的iOS使用圖像背景按鈕
- 11. 使用非simmetrical按鈕背景圖像
- 12. 如何在LinearLayout中將圖像按鈕與等寬對齊
- 13. 將背景圖像與垂直居中的左側對齊
- 14. 如何垂直居中對齊具有背景圖像的div
- 15. FlexboxLayout與背景圖像按鈕,如何保持其大小
- 16. 如何對齊具有對角邊緣的div背景圖像?
- 17. 背景圖像沒有正確對齊
- 18. 對齊背景精靈圖像
- 19. 核心繪圖CPTextLayer:文本與背景圖像對齊作爲背景顏色
- 20. 如何使一個按鈕的研究背景圖像resonsive
- 21. 如何使用jquery更改輸入按鈕的背景圖像
- 22. 其他按鈕下的背景圖像
- 23. 更改按鈕的背景圖像
- 24. 圖像按鈕設置背景的onclick
- 25. Silverlight的按鈕背景圖像刷
- 26. 更改按鈕的背景圖像?
- 27. 旋轉按鈕的背景圖像
- 28. 如何與圖像添加背景圖像上的按鈕動態
- 29. 如何將按鈕圖像與實際按鈕的大小對齊?
- 30. Android:如何通過XML中的按鈕更改背景圖像
歡迎來到StackOverflow!爲了讓我們更好地爲您提供幫助,能否請您更新您的問題,以便在[**最小,完整和可驗證的示例**]中顯示**相關代碼**(http://stackoverflow.com/幫助/麥克風)在問題本身。如果您能讓我們知道您迄今爲止已經嘗試解決您的問題,也會有所幫助。有關詳細信息,請參閱有關[**如何提出良好問題**](http://stackoverflow.com/help/how-to-ask)的幫助文章,並參加該網站的[**遊覽**](http://stackoverflow.com/tour):) –