Home  >  Article  >  Web Front-end  >  How to disable dragging in css

How to disable dragging in css

藏色散人
藏色散人Original
2021-04-23 09:37:504094browse

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.

How to disable dragging in css

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is css preprocessingNext article:What is css preprocessing