所属分类:web前端开发
使用HTML中的cols属性来显示文本区域的可见宽度。您可以尝试运行以下代码来实现cols属性−
<!DOCTYPE html> <html> <body> <textarea rows="3" cols="40"> This is a demo paragraph. This is a demo paragraph. This is a demo paragraph. This is a demo paragraph. </textarea> </body> </html>