2
我在使用Chrome的contenteditable时遇到问题。我在span的onmouseover事件中使用了contenteditable属性,并添加了一些填充。当跨度聚焦(编辑)时,在Chrome中进行测试时,插入符号与跨度底部边界对齐,在Firefox上可以正常工作。Chrome contenteditable插入符号
HTML
<div>
Some <span onmouseover="this.contentEditable=true;">Editable</span> Text
</div>
CSS
[contenteditable]:focus {
background: rgba(255,220,0,0.3);
padding: 10px;
}
小提琴here
感谢您的帮助
感谢您的回复,但有没有其他方法可以解决它?因为我需要这些跨度元素内联。 – KiiroSora09 2013-04-23 15:24:23
'display:inline-block'来拯救! – 2013-04-23 16:04:40
@JonGrant,做到了!谢谢! – KiiroSora09 2013-04-23 16:34:53