This topic created in 1391 days ago, the information mentioned may be changed or developed.
一个 html 有个背景 div ,里面放了一些图片啥的,在安卓的 chrome 上,本来是要长按复制 html 上的内容,但是很容易长按到空白区域的背景上,这时候就会弹出分享啊、下载、新标签打开此图片啥的菜单。
搜索了一下有个“onselectstart="return false" onselect="document.selection.empty()"”
添加到 div 中,似乎不起作用。
12 replies • 2022-09-01 16:35:46 +08:00
 |
|
1
ragnaroks Aug 31, 2022
style user-select:none
|
 |
|
4
lingxiaoli Sep 1, 2022
-webkit-touch-callout: none;
|
 |
|
7
CSGO Sep 1, 2022 via Android
@ ragnaroks 是不是把 img 换成 div 的背景就能解决?我先试下。
|
 |
|
11
ragnaroks Sep 1, 2022 1
body 下创建一个新 div
div.bgp { filter: opacity(10%) blur(10px); background-image: url(/img/bg.gif); background-repeat: no-repeat; background-size: contain; width: 100vw; height: 100vh; z-index: 0; position: fixed; user-select: none; }
div.wifi-body { z-index: 1; }
|
 |
|
12
CSGO Sep 1, 2022
@ ragnaroks 我也不会了,难道是我刚改完 github 还没推送完。。。太感谢你的细心回复
|