Home  >  Article  >  Web Front-end  >  HTML5 attribute draggable specifies whether an element is draggable

HTML5 attribute draggable specifies whether an element is draggable

黄舟
黄舟Original
2017-11-03 10:52:344321browse

Example

A draggable paragraph:

这是一个可拖动的段落。

Browser support


IE

Firefox

Chrome

Safari

Opera


##Internet Explorer 9+, Firefox, Opera, Chrome, and Safari supported draggable property.

Note: Internet Explorer 8 and earlier versions do not support the draggable attribute.

Definition and usage

The draggable attribute specifies whether the element can be dragged.

Tip: Links and images are draggable by default.

Tip: The draggable attribute is commonly used in drag-and-drop operations. Learn more in our drag and drop tutorial.

Differences between HTML 4.01 and HTML5

The draggable attribute is new in HTML5.

Syntax

Attribute value

ValueDescriptiontrueSpecifies that the element is draggable. false Specifies that the element cannot be dragged. autoUse the browser's default behavior.
Example:




    
        
        HTML5-draggable(拖放)
        
        
        
    
HTML5 attribute draggable specifies whether an element is draggable

                        HTML5 attribute draggable specifies whether an element is draggableHTML5 attribute draggable specifies whether an element is draggable

The above is the detailed content of HTML5 attribute draggable specifies whether an element is draggable. 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