1
我試圖找到一個解決方案來調整我的日曆在網頁上的大小。但它仍然受阻。FullCalendar全局寬度
以下是我有:
我用這種伎倆來要善於日曆高度:
function get_calendar_height() {
return $(window).height() - 30;
}
$(window).resize(function(){
$('#calendar').fullCalendar('option', 'height', get_calendar_height());
});
然後選項:
height: get_calendar_height
問題是我想這個日曆的寬度是80%。我在CSS中寫道:
#calendar{
width: 80%;
}
但它不工作..
感謝您的幫助。
你能不能,或者與我們分享您的代碼或創建[的jsfiddle(https://jsfiddle.net/),以便我們能仔細看看嗎? – Deathstorm
要設置寬度,請使用'#calendar {寬度:80%!重要; }'。您可以使用'!important'來覆蓋寬度爲100%的內聯樣式。 – Zionz
對不起。我在我的js代碼中做錯了。事實上,我寫了一個div