我上传到上面发布的图像,第一个显示Firefox的输出,第二个显示IE8的输出。
我的CSS看起来像这样
.popBox {
position: absolute;
z-index: 2;
width: 52%;
border: 1px solid gray;
background: #cccccc;
-moz-border-radius: 50px/50px;
-webkit-border-radius: 50px 50px;
border-radius: 50px/50px;
text-align:center;
display:inline;
padding-left:20px;
padding-right:20px;
padding-top:10px;
padding-bottom:10px;
}
span {
color: blue;
font-weight: sans-serif;
}
我想达到与IE8上的FF相同的效果。
任何帮助将不胜感激。
P.S-我不太了解HTML / CSS部分。上面显示的CSS嵌入在JSP页面中。
但似乎我今天被卡住了。
[编辑]
我试图添加这样的东西
-ms-border-radius:50px | 50%;
并且我正在关注this
当我重新加载页面时,什么也没发生!
忘了椭圆形,我不能在使用IE8的鼠标上显示任何元素。
这是我完整的jsp页面。
<script>
function showBox(text, obj) {
helpNode = document.createElement('div');
helpNode.id = 'popBox';
helpNode.setAttribute('class','popBox');
helpNode.innerHTML = text;
obj.appendChild(helpNode);
}
function hideBox() {
node = document.getElementById('popBox');
node.parentNode.removeChild(node);
}
</script>
<style type="text/css">
.popBox {
position: absolute;
z-index: 2;
width: 52%;
border: 1px solid gray;
background: #cccccc;
-moz-border-radius: 50px/50px;
-webkit-border-radius: 50px 50px;
border-radius: 50px/50px;
text-align:center;
display:inline;
padding-left:20px;
padding-right:20px;
padding-top:10px;
padding-bottom:10px;
}
span {
color: blue;
font-weight: sans-serif;
}
</style>
<c:if test="${sessionScope.helpPurpose != null && sessionScope.helpPurpose != ''}" >
<table border="0" cellspacing="0" cellpadding="0" width="15%">
<tr>
<td>
<div onmouseover="showBox('<table ><tr><td><b>Purpose: </b><%=request.getSession().getAttribute("helpPurpose") %></td><br> <br><br></table>', this)" onmouseout="hideBox()"><span><img id="imgperName" src="<c:url value='/images /strutsmenu/plus.png'/>" ></span></div>
</td>
<td>
<div><span><font size="2"> Purpose Of Form</font></span></div>
</td>
</tr>
</table>
</c:if>
最佳答案
好吧,border-radius
并不是在ie9之前的ie版本中本地实现的。
要在ie中使用此功能,我建议查看以下JavaScript库:http://css3pie.com/。