Home > Article > Web Front-end > How to disable dragging in css
How to disable dragging in css: First open the corresponding HTML code file; then add the code "-webkit-user-drag:none;" to the body style to disable dragging.
The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.
CSS Disable drag selection
To disable page content selection and copy operations through CSS, just add the following code to the body style:
# 禁止拖拽 -webkit-user-drag: none; # 禁止选中 -webkit-user-select: none;
[Recommended Study: css video tutorial】
The above is the detailed content of How to disable dragging in css. For more information, please follow other related articles on the PHP Chinese website!