可以同时存在。auto-height实现原理是动态计算出高度然后应用到textarea元素的内联样式上,我们仍然可以在...
/* 实现textarea高度自适应 */ .detail-view { /* 用于重叠 */ position: relative; margin: 40rpx 20rpx; min-height: 80rpx; } .detail-placeholder { /* 用于重叠 */ position: absolute; /* 用于与textarea的光标起始位置对齐 */ padding: 0 10rpx; min-height: 100%; color: #c9c9c9; font...
placeholder 输入框为空时占位符 wxss文件内容 /* pages/textareaAutoheight/textareaAutoheight.wxss */.text_box{background-color:white;width:544rpx;border-radius:10rpx;border:1px solid #e9e9e9;padding-left:28rpx;font-size:30rpx;padding-top:8rpx;}.text_box .weui-textarea{width:528rpx;padding-left...
) <!--textarea自适应高度--> <h3>textarea自适应高度</h3> <textarea style='border: 1px solid #94BBE2;width:100%;height:200px;' rows=15 onpropertychange='this.style.posHeight=this.scrollHeight' id=textarea onfocus='textarea.style.posHeight=this.scrollHeight'> <br> <Br> </textarea>...