在 MAC 中:Safari 当点击图标时它似乎没有反应,但是如果你右击并打开链接新标签,新标签显示模式打开。所以它可以发挥作用——只是不太对劲。
适用于 IOS Firefox、Chrome 和 Windows Chrome、Firefox 和 IE。模态打开和关闭没有发生意外。
生活在 Codepen: https://codepen.io/Kallisti/pen/qKBPYd
图标区
<g id="Freshen_Up"><title>Freshen Up</title>
<a class="wraps" xlink:href="#popup2">
对应模态区
<div id="popup2" class="overlay">
<div class="popup">
<h2>Freshen Up</h2>
<a class="close" href="#"><i class="fas fa-undo"></i></a>
<div class="content" style="color:white;">Lots of compelling text about paint goes here.<p style="font-family:'Roboto', Arial, sans-serif; font-size:25px; text-align:right;">
<a href="" id="Freshen_Up_text">Learn More</a> <span style="font-size:20px; color:#F96302;">›</span></p>
</div></div></div>
最佳答案
要在 Safari 中解决此问题,请添加弹出窗口的完整路径。
例如,对我来说#popup6 的完整路径是 http://localhost:63342/untitled/as.html?_ijt=iu76dcvb0efa8l80bcetud0834#popup6
查看附件中的视频 cl.ly/1G092s332D1v
关于html - SVG 模式在 Safari 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50613221/