按钮在 FF、Chrome、Safari 中显示正常。不会在 IE 7/8 中呈现。
这是我得到的代码:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="RadMenu.css">
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<g id="g" shape-rendering="inherit" pointer-events="all">
<circle cx="400" cy="210" r="25.6" fill="white" stroke="#505055" strokewidth="2">
</circle>
<foreignObject x="383" y="192" width="32" height="32" id="PBtn16400210">
<html>
<body>
<div class="Btn3D" title="" style="width: 101%; height: 100%; background-color: rgb(218, 184, 82); text-align: center; vertical-align: middle; background-position: initial initial; background-repeat: initial initial;"></div>
</body>
</html>
</foreignObject></g>
</svg>
</body>
</html>
最佳答案
Internet Explorer 直到 v9 才支持 SVG(即使那时它也只是基本支持)。
关于html - 在 IE 7/8 中渲染 svg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16328629/