【发布时间】:2015-10-28 19:14:49
【问题描述】:
我一遍又一遍地尝试,但我似乎可以让文本可编辑且可拖动,因为当我应用 .draggable() 时,contenteditable="true" 变为 "false"。
Javascript
$(".note").keyup(function() {
$(this).css('height' , '100%');
});
HTML
<div class="note" contenteditable="true">
<span id='close' onclick='this.parentNode.parentNode.removeChild(this.parentNode)'>
<img src="images/close.png" height="30" width="30" align="right" style="vertical-align: top; float: right"/>
</span>
</div>
CSS
.note {
width: 280px;
height: 130px;
padding-top: 20px;
margin-top: 60px;
margin-left: 25px;
padding: 2;
word-break: break-word;
font-family: Note;
font-size: 20px;
background-image: url("images/stickynote.png");
background-repeat: no-repeat;
background-size: cover;
z-index: 1;
}
【问题讨论】:
标签: javascript html css