欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!
  1 <!doctype html>
 
  2 <html lang='zh-cn'>
 
  3 <head>
 
  4     <meta charset='utf-8'>
 
  5     <meta name='author' content='宋英杰'>
 
  6     <meta name='keywords' content=''>
 
  7     <meta name='description' content=''>
 
  8     <title>textarea</title>
 
  9     <style type='text/css'>
 
  10     *eee{margin:0;padding:0;}
 
  11     html{font-size:100px;}
 
  12     body{font:0.14rem/1.5 Microsoft Yahei,Arial,'宋体','黑体';background:#FFF;}
 
  13     </style>
 
  14 </head>
 
  15 <body>
 
  16     <textarea readonly name="txtarea1" style="width:800px;height:400px;">
 
  17 注释:在文本输入区内的文本行间,用 "%OD%OA" (回车/换行)进行分隔。
 
  18 <html>
 
  19     <head>
 
  20     </head>
 
  21     <body>
 
  22     效果测试专用;
 
  23     不要用tab,集成上文的效果,神烦;
 
  24     属性:
 
  25     disabled:不能操作此文本域;
 
  26     readonly:字面;
 
  27     autofocus:自动获取文本域为焦点
 
  28     wrap:换行方式
 
  29       soft显示效果自动换行;提交数据不自动换行;(默认)
 
  30       hard全自动换行
 
  31       off:
 
  32       physical=hard
 
  33       virtual=soft
 
  34     form:指定想关联的form元素的id
 
  35     placeholder:占位符,无内容时显示
 
  36     required;表示此项目为必须输入项目(必填内容)。
 
  37     样式:固定高宽:1,resize:none;2,max-width:apx;,max-height:apx;;resize级别高于max
 
  38     </body>
 
  39 </html>
 
  40     </textarea>
 
  41     <form>
 
  42         <textarea autofocus required name="txtarea2" placeholder="请输入账号" style="width:300px;height:200px;resize:none;max-width:300px;max-height:200px;"></textarea>
 
  43     </form>
 
  44 </body>
 
  45 </html>

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/html/h61290.shtml