问题标签 [height]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
jquery - jQuery sortable item height
I've got a simple jQuery sortable based on a list as follows:
I've created a helper function so that regardless of what the contents of an item may be, the helper is always the same fixed size.
My problem is that if I drag an item that has a lot of content (says several paragraphs of text), even though my helper is only a single line in height, the item will not drop onto the item below until it has travelled at least the original height of my item.
For example:
If I drag item1 my helper turns this into a single line - nice and easy to drag. However, I still need to move the mouse 5 lines down the screen before item1 can be dropped between item2 and item3. Once I do drag it sufficient height the item then seems to function as I would expect, and I no longer need to drag it the original height.
I've tried all of the sortable options I can think of but to no avail and am hoping that someone has a suggestion.
jquery - 在调整大小时保持相等的高度(jQuery)
我使用此代码来平衡列:
..做得不错,但是我在其中一个列中有一个手风琴菜单,可以滑入/滑出改变列的高度,equalheight 不能很好地配合它。每次调整大小时是否可以均衡列?
多谢!
jquery - 浮动“行”内的 DIV 等高
好的,所以我有这个代码:
好的,所以上面的每个 DIV 都向左浮动,所以我得到的是 DIV 的两个“行”,上面的行包含前两个,第二个包含后三个 DIV,对吗?
好的,所以每个“layout_frame”都可以包含任何内容,所以它们的高度不同,但我希望行内的高度相等。所以前两个可能都应该是 800px 高,第三个应该是,例如,200px - 基于“行”中最高的 DIV。
所以我使用 jQuery position() 来找出哪些在同一行中,代码如下:
但这就是我所到之处。我将“pos”设置为,比如“124”,前两个应该相等,而不是后三个。但是每个“组”的 DIVS 应该具有相同的高度,基于最高的。
我真的希望我正确地解释了这一点。任何帮助表示赞赏
css - 全视口高度缩放 div 只是 css 没有 js ...可能吗?
好的,我正在尝试让一个 div 进行缩放,并且高度始终是视口的高度。我将链接到我的示例,因为它需要一些解释。
www.madmediablitz.com/tv/precentdemo.html
上面的链接是我最接近解决方案的链接,我希望这里的人会发现它很容易修复。我想要发生的是电视始终是视口的高度(在一定程度上,最小高度:~400px;最大高度:~700px;)。我在那里使用的代码基于http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/。
www.madmediablitz.com/tv/precentdemo_alt.html
这是我不想发生的事情。如果您调整窗口大小,您会看到它不会按比例缩放。
我已经尝试了这两种方法大约 2 天了,但我无法让它工作。我真的在祈祷帮助,因为我认为这并不太复杂。
height - 平均和/或最大视口高度是多少?
1024x768 分辨率屏幕上视口(可见区域)的平均和/或最大高度是多少?我想知道什么被认为是这个决议的“首当其冲”。
css - 为什么我的不扩展到高度:100%?
我有 3 个与此相对应的 div。
我有#wrapper,它包裹着一切。那是#EEE,我有#contain,它在#wrapper 之后。那是#FFF(内容的一部分)
我有#secondaryContent,它的高度:100% 非常好,位置:固定。这在这两个 div 中。
我为所有主要的 div 添加了边框以查看发生了什么。
好的,中间 div 的底部应该 100% 延伸到底部,显示包装器没有灰色。如果您仔细查看页面顶部,您会看到一条紫色线。这实际上是一个名为#content 的div,它应该包含所有的帖子。我不知道它显示了什么,好像里面什么都没有,但它应该 //(* 固定 * - 见第二个答案)。
你可以通过我的服务器看到我的意思。
FIX***
应用于#wrapper div 的类“.container”是搞砸了一切。
css - 高度 100% 不适用于 Internet Explorer 8 中的 DIV 标记
我有以下代码用于显示带有滚动结果部分的搜索工具。在 IE 中,代码工作正常:
但是当我通过添加将元标记设置为使用 IE8 格式时:
底部的 DIV 标记扩展到页面之外。虽然我尝试了许多选项,但如果没有实际指定值的高度,就找不到解决方法。这不起作用,因为无论浏览器窗口的大小如何,我都希望页面占据 100% 的屏幕。
任何帮助将非常感激。
jquery - 自动高度 IFrame
我想制作一个从其他网站加载页面的 iframe 页面。我已经尝试“jQuery iFrame Sizing”在 iframe 中设置自动高度......但它失败了。
有什么问题...?
这是我的代码:
asp.net - 更新后更新面板高度保持最大尺寸
经过将近 4 年的使用,我的一位测试人员注意到我的更新面板有些奇怪。
假设我有一个显示模式,它的高度为 100 像素。然后用户切换到编辑模式并且更新面板更新。现在窗口的高度为 500 像素。用户点击保存,返回显示模式,只有 100 像素。
现在dom只占用了100个像素,但是一直到500个像素还有一个滚动条。如果用户将屏幕缩小到 100 像素,他/她仍然会看到一个滚动条,尽管事实上那里已经什么都没有了。
这到底是什么原因造成的,我该如何解决?就像更新面板没有告诉窗口它不再需要所有高度一样。