Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
阅读stackoverflow负载,它无数次救了我!:) 我需要一些帮助,但如果可能的话,我需要以下帮助:
我有一个名为 wrap1 的 div,它有一个调整大小的功能,它只能水平工作
在这个 div 里面是另一个包含内容的 div。
我需要的是 wrap1 只有当它们使其小于内容的宽度时,它才会自动增加 div 的高度,因此它不会超出 wrap1 div (目前它正在强制它正确地向下移动到第二行但 div 高度是错误的
任何帮助将不胜感激 :)
jQuery('#wrap1').draggable().resizable({handles: 'e, w,ne,nw,se,sw', resize: function(event, ui) { $(this).css('height' , '汽车'); } });
该代码使其可拖动,然后在调整大小时更新了 div 高度:)
我们还通过将 html 代码附加到 wrap1 div 中来实现调整大小框...然后在取消选择时删除此代码