6
這裏經過動態調整的問題:允許窗口過渡
我們可以得到窗口根據內容調整大小,但是當窗口大小高度不動態改變或者留下一噸以下空白或者將內容隱藏在頁面的其餘部分之後。
下面的代碼:
HTML:
<div class="panel-container" style="height: 706px;">
<div class="control-panel create-job flexible">
<div class="column-container">
JSX:
resizePanel: function (height) {
this.refs.panel.style.height = height + 'px';
},
getPanelContainerStyle: function (controlPanel) {
if (this.state.isPanelOpen && _.isObject(controlPanel)) {
var height = controlPanel.type.prototype.height;
if (_.isNumber(height)) {
return {height: height};
} else return {height: 100};
} else return {};
},
CSS:
.panel-container
height 0
transition height 0.3s
margin-top bump-lg px
margin-bottom bump-lg px
任何幫助,非常感謝!
我還沒有,但我會先給這個「max-height」一個鏡頭,看看我們是否可以做出合作。 –
我只是嘗試了這一點,但它並沒有對這種情況下的工作。還是)感謝你的建議! –