這是我嘗試使用的應用程序的一個示例。 在IE10中的GUI(無兼容模式)與IE9中的GUI應該相同。但在IE10中,「ADD」標籤的背景圖像尺寸正在縮小。 我無法找到確切的原因。 很少有解決方案建議我必須提供明確的「高度」和「寬度」參數,但這也沒有幫助。從IE9(java代碼)在IE10中減少背景圖像尺寸
我不明白我在做錯的方式。謝謝。 的JSP代碼如下:
<html>
<head>
<style>
.buttonM{
color: red;
padding-top: 4px;
font-family: "Verdana";
font-size: 8pt;
cursor: hand;
background-image:url("images/buttonM.png");
background-repeat: no-repeat;
}
.buttonMOver{
color: white;
padding-top: 4px;
font-family: "Verdana";
font-size: 8pt;
cursor: hand;
background: url("images/buttonM.png") no-repeat ;
background-repeat: no-repeat;
}
table, th, td{
border: 1px solid black;
}
label{
height: 23;
text-align: center
}
</style>
<script>
function fnButtonClicked(){
alert("button clicked");
}
</script>
<title>trial</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR"
content="Rational® Application Developer for WebSphere® Software">
</head>
<body>
<table>
<tr height="40">
<td>
Name:
</td>
<td>
<input type="text">
</td>
</tr>
<tr height="40">
<td>
Number:
</td>
<td>
<input type="text">
</td>
</tr>
<tr height="40">
<td align="center" colspan="2">
<label class="buttonM"
style="width: 80; height: 23;"
onmouseover="this.className='buttonMOver';"
onmouseout="this.className='buttonM';"
onclick="javascript:showDetailsPopUp();">
ADD
</label>
</td>
</tr>
</table>
</body>
</html>
沒有添加任何單獨的按鈕。它是一個包含文本的表格單元格中的標籤類。所以我已經給出了不用幫助的高度和寬度參數。你的意思是說我在'buttonM'類中添加這些參數嗎? –
在定義按鈕尺寸 – Dashovsky
後,您錯過了像素單位,但無法使用。它仍然是一樣的。 –