跨度内容可编辑宽度不起作用 [英] span contenteditable width won't work
本文介绍了跨度内容可编辑宽度不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当span标签与contenteditable = true属性一起使用时,它将忽略所有宽度的css
When the span tag is used with the attribute contenteditable="true" then it ignores all width css
<span contenteditable="true" style="width:400px;border:1px solid black;">
Content filler
</span>
上面的代码会产生此
有人知道如何制作它,因此该框不符合此类文字并遵循常规CSS ?
The above produces this
Does anybody know how to make it so the box doesn't conform to the text like this and follows regular CSS?
推荐答案
span是 display:inline
元素。
应用 display:inline-block;
或 display:block;
到跨度。
这篇关于跨度内容可编辑宽度不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文