CSS、HTML:向可滚动元素内部添加空间的最佳方法是什么?

发布于 2024-10-03 22:32:28 字数 80 浏览 1 评论 0原文

水平和垂直都可以吗?

我正在使用 jquery ui 的可拖动功能,该功能限制在 div 内,并且我需要一个较大的内部区域来使用。

Both horizontally and vertically?

I am using jquery ui's draggable feature constrained within a div, and I need a large internal area to work with.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

撩动你心 2024-10-10 22:32:28

在可滚动元素上使用 padding,然后在子元素上使用 margin

Use padding on the scrollable element and then use margin's on the children.

无言温柔 2024-10-10 22:32:28

填充就是您正在寻找的。这是使用它的小指南。
http://www.w3schools.com/css/css_padding.asp

还有一个“盒子模型”指南,它将在学习边距、边框、填充等如何影响元素时派上用场。它位于上面链接的左侧导航面板上(我无法发布 2 个链接)

Padding is what you are looking for. Here's a little guide to using it.
http://www.w3schools.com/css/css_padding.asp

There is also a guide to the "box model" which will come in handy learning how margins, borders, padding etc. effect a element. It's on the left navigation panel of the link above (I can't post 2 links)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文