正如标题所示,如何使用 over: hide 获取被容器 div 部分隐藏的元素的完整高度。几乎就好像它没有隐藏和可滚动一样。
有任何想法吗?
HTML
<div id="wrapper">
<div id="content">Short ribs frankfurter jerky, corned beef tongue chuck meatball. Hamburger drumstick chuck pork chop brisket, prosciutto leberkäse bresaola shank. Corned beef chuck prosciutto beef cow. Tail bresaola biltong, turkey beef beef ribs cow salami. Ground round sausage filet mignon andouille beef ribs, venison pork loin swine frankfurter turkey. Ball tip drumstick swine, ribeye t-bone chuck meatball brisket salami. Meatball pork chop corned beef filet mignon pastrami pork loin ham t-bone andouille kielbasa.
Drumstick spare ribs shank, pastrami bacon biltong swine meatball capicola. Chicken salami short ribs meatloaf cow kielbasa. Chuck ham hock venison rump, flank frankfurter short ribs sirloin ribeye ham leberkäse capicola drumstick. Capicola ball tip beef tail pastrami, shank pork loin pancetta frankfurter swine ribeye andouille. Andouille chicken pork belly leberkäse pastrami, swine corned beef. Jerky rump frankfurter, short loin hamburger beef kielbasa biltong ground round fatback. Pork chop tri-tip ham hock ham.
</div>
</div>
CSS
#content {
height: auto;
}
#wrapper {
height: 30px;
overflow: hidden;
}
jQuery/JS
$('#content').height()
DEMO
http://jsfiddle.net/sparky672/gQanb/4/ http://jsfiddle.net/sparky672/gQanb/4/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)