0
我有一個站點的代碼片段,用於實現textarea的彈性特性。除了我無法將textarea的高度或最小高度設置爲所需的像素值這一事實之外,這樣做很好。這一切都安排在我試圖弄清楚的代碼本身中,但徒勞無功。我想將textarea的高度設置爲10像素。我應該在哪裏進行更改?ElasticText的最小高度
//code has been altered
我有一個站點的代碼片段,用於實現textarea的彈性特性。除了我無法將textarea的高度或最小高度設置爲所需的像素值這一事實之外,這樣做很好。這一切都安排在我試圖弄清楚的代碼本身中,但徒勞無功。我想將textarea的高度設置爲10像素。我應該在哪裏進行更改?ElasticText的最小高度
//code has been altered
/**
* ElasticTextbox that expands vertically or horizonally
* config:
* node: {HTMLDOMElement} : DOM Element to attach to :: Required
* vert: {Boolean} : Expand vertically :: Optional (default: true)
* horz: {Boolean} : Expand horizonally :: Optional (default: false)
* height: {Integer} : Beginning static height :: Optional
* maxHeight: {Integer} : Maximum height of node :: Optional
了minHeight:200
* maxWidth: {Integer} : Maximum width of node :: Optional
* minWidth: {Integer} : Minimum width of node :: Optional
* width: {Integer} : Beginning static width :: Optional
* resize: {Boolean} : CSS Resize :: Optional (default: false)
* overflow: {string} : CSS Overflow :: Optional (default: hidden)
* NOTE: most of these values should be set with CSS
但是它說,你可以用CSS設置 - 從來沒有使用過的插件(而不是閱讀完整的代碼),我會建議先嚐試一下。 (並且無論如何incase用戶沒有javascript啓用!)
謝謝@graham,但在哪裏寫這個代碼 – rosemary
它已經在你的代碼!通過你的代碼搜索 - 查找* maxHeight行,並在它下面將該行更改爲我以粗體顯示的行(以你想要的高度顯示) –