Basics front end (13) contenteditable properties

This attribute specifies whether the element can be edited (HTML5 new).

contenteditable attribute If the element is not set, the element will inherit the property from its parent element.

grammar structure:

<``element contenteditable``=``"true|false|inherit"``>

Parameters Resolution:

(1) .true: presentation elements can be edited.

(2) .false: represents an element can not be edited.

(3) .inherit: representation inherited from the parent element, the default value.

Browser support:

(1) .IE9 + browsers support this property.

(2). Google browsers support this property.

(3). Firefox browsers support this property.

(4) .opera browsers support this property.

(5) .safria browsers support this property.

Code examples:

<!doctype html>

<``html``>

<``head``>

<``meta charset``=``"utf-8"``>

<``meta name``=``"author" content``=``"[http://www.softdewhy.com/](http://www.softdewhy.com/)" />

<``title``>兴趣部落</``title``>

<``style``>

.ant {

width:100px;

height:100px;

background-color:#ccc;

}

</``style``>

</``head``>

<``body``>

<``div class``=``"ant" contenteditable``=``"true"``></``div``>

</``body``>

</``html``>

Finally, I recommend a push in the front-end learning exchange group 685 910 553 Advanced ( front-end information-sharing ), no matter which direction you are on Earth,
whether you are welcome to work in a few years you settled in! (Within the group regularly offer free collection of some of the main group of free learning materials and books tidied face questions and answers document!)
Here Insert Picture Description

If you have any objection to this article, then please write your comments in the article comments at.

If you find this article interesting, please share and forward, or you can look at, you acknowledge and encouragement of our articles.

Wish everyone in the programming this road, farther and farther.

Guess you like

Origin blog.csdn.net/fenghulun/article/details/91472261