如何在我的网站中禁用 Safari 的实时文本?

问题描述 投票:0回答:0

我正在制作一个 Vue 应用程序,在导航栏中我有一个徽标,当您单击它时,它会将您带到主页。

标志是一个

.svg
和站点名称,有两行。假设该网站名为 HelloWorld.com,徽标有点像这样:

你好

world.com

在 Safari 中,Live Text 出现(类似于 this)并添加了一个可以将用户发送到 world.com 的层,这不是最好的用户体验。

有什么方法可以从 Vue、HTML、CSS 禁用它吗?

我尝试将此属性用于我的 img 标签:

<img
@click="goToHome()" 
class="img-logo-navbar" 
src="/imgs/logo-RCN-black.svg"
style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select:none; user-select:none;-o-user-select:none; -webkit-touch-callout: none;" 
unselectable="on"
onselectstart="return false;"
onmousedown="return false;"
/>
html css vue.js safari frontend
© www.soinside.com 2019 - 2024. All rights reserved.