我上传到上面发布的图像,首先显示 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-边框半径: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/ .
关于css - IE8 和 MOzilla firefox 之间的跨浏览器兼容性问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7482639/