我在表格中显示html内容.对于打印标签,我使用textArea的<td>表格.所以我想调整它的高度和宽度textArea,使它等于<td>.我怎样才能做到这一点
Vla*_*kov 48
这CSS将有助于你:
textarea {
border: none;
width: 100%;
-webkit-box-sizing: border-box; /* <=iOS4, <= Android 2.3 */
-moz-box-sizing: border-box; /* FF1+ */
box-sizing: border-box; /* Chrome, IE8, Opera, Safari 5.1*/
}
Run Code Online (Sandbox Code Playgroud)
css文件,则可以使用内联css像这样:
<textarea style="border: none; width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;"> </textarea>
Run Code Online (Sandbox Code Playgroud)