你的ckeditor自适应高度是怎么解决的啊?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了你的ckeditor自适应高度是怎么解决的啊?相关的知识,希望对你有一定的参考价值。
http://zhidao.baidu.com/question/297386174.html我以前回答过类似问题,希望可以作为你的参考
具体如下:
var oCKeditor = CKEDITOR.replace( \'content\' );
oCKeditor.on( \'instanceReady\', function( event )
var editor = event.editor;
setTimeout( function()
// Delay bit more if editor is still not ready.
if ( !editor.element )
setTimeout( arguments.callee, 100 );
return;
event.removeListener( \'instanceReady\', this.callee );
if ( editor.name == \'content\' )
editor.resize( editor.container.getStyle( \'width\' ), CKEDITOR.document.getById( \'cke_\'+\'content\' ).getParent().$.offsetHeight );
, 0 );
, null, null, 9999 ); 参考技术A 把这个放置在一个table里、然后自动设置table 行列的高度、
CSS控制,子div的高度自适应父div的高度
<div id="a"> <div id="aa"></div> <div id="bb"></div></div> 如上结构,现在只有#bb的高度,我想让#aa的高度自适应与#bb的高度,还望前辈们不吝指教。。。
参考技术A 你没有设置高度,怎么来的自适应呢?我认为默认不设置高度适应的都是内容的高度,不论这个内容来自于子div还是父Div 参考技术B 很简单的,这个是你的套嵌错误啊,你把BB套嵌到AA里面就好了。<div id="a"> <div id="aa"> <div id="bb"></div> </div></div>这个布局,aa的高度就自适应bb的高度了,分好主次就可以了。 参考技术C 两个都自适应高度不好吗,如果一定要aa跟bb那只能写js以上是关于你的ckeditor自适应高度是怎么解决的啊?的主要内容,如果未能解决你的问题,请参考以下文章