未验证 提交 a1015e2f 编写于 作者: O Owen M 提交者: GitHub

Update README.md

上级 415506bf
......@@ -521,19 +521,16 @@ The distance (in pixels) the mouse must be from an empty sortable while dragging
Demo: https://jsbin.com/becavoj/edit?js,output
Instead of this, you can just set a padding on your list when it is empty. Warning, for :empty to work, it must have no node inside (even text one).
(It will help if your lists are side-by-side, since you only want the drag occurs when you are under the list - not at the left)
Adding a CSS rule :
An alternative to this option would be to set a padding on your list when it is empty.
For example:
`ul:empty {
background:pink;
padding-bottom:3em;
padding-bottom: 20px;
}`
And rewriting the empty list as : `<ul id="list2" class="list-group"></ul>` (so that it is really empty)
Warning: For :empty to work, it must have no node inside (even text one).
You got :
https://jsbin.com/galujuvayi/edit?html,css,js,output
Demo:
https://jsbin.com/yunakeg/edit?html,css,js,output
---
### Event object ([demo](https://jsbin.com/fogujiv/edit?js,output))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册