有没有办法让 <div> 容器可以通过拖动 &掉落?
Is there a way to make a <div> container resizeable with drag & drop?
最好的方法是使用 CSS3.它至少被 Webkit 和 Gecko 支持.
The best method would be to use CSS3. It supported by at least Webkit and Gecko.
根据w3c 规范:
div.my_class {
resize:both;
overflow:auto; /* something other than visible */
}
Webkit 和 Firefox 对规范的解释方式不同.在 Webkit 中,大小仅限于设置的宽度和高度.还有一个问题:如何使用 CSS 将元素调整为小于初始尺寸的尺寸? 关于这个.
Webkit and Firefox do not interpret the specs the same way. In Webkit the size is limited to the width and height set. There's another question: How can I use CSS to make an element resizable to a dimension smaller than the initial one? concerning this.
这篇关于如何制作<div>可调整大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何在 Jasmine 中编写 FileReader 测试?How do I write FileReader test in Jasmine?(如何在 Jasmine 中编写 FileReader 测试?)
JS/HTML5 WebSocket:无需 HTTP 调用即可连接JS/HTML5 WebSocket: Connect without HTTP call(JS/HTML5 WebSocket:无需 HTTP 调用即可连接)
CSS:分页后重复表头(打印视图)CSS: Repeat Table Header after Page Break (Print View)(CSS:分页后重复表头(打印视图))
将 HTML 头放在另一个文件中Put HTML head in another file(将 HTML 头放在另一个文件中)
“头"和“头"之间的真正区别是什么?和“What is the real difference between the quot;headquot; and quot;headerquot; tag?(“头和“头之间的真正区别是什么?和“标题标签?)
标题宽度(H1、H2 等)Width of Headers (H1, H2 etc)(标题宽度(H1、H2 等))