[英]disable copy in html style
Is it possible to disable copy of header.value
in this "if"?是否可以在此“if”中禁用
header.value
的副本? (if yes, how?) (如果是,如何?)
<div
class="value"
style="{{header.name === 'abc' ? 'color: transparent; text-shadow: 0 0 5px black;' : ''}}"
>
{{ header.value }}
</div>
Thanks!谢谢!
You can use this in the css:您可以在 css 中使用它:
.value {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
This would prevent user from selecting the text and copying it.这将阻止用户选择文本并复制它。 Sample: https://codesandbox.io/s/small-sea-rseff?file=/index.html
样品: https://codesandbox.io/s/small-sea-rseff?file=/index.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.