Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
自动调整HTML中输入字段的大小_Html - Fatal编程技术网

自动调整HTML中输入字段的大小

自动调整HTML中输入字段的大小,html,Html,如果最小化浏览器窗口,那么我必须做什么才能使表中的输入变小?谢谢 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <

如果最小化浏览器窗口,那么我必须做什么才能使表中的输入变小?谢谢

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
    <table>
        <tr>
            <td>
                <input type=text>
            </td>
            <td>
                <input type=text>
            </td>
        </tr>
            <td>
                <input type=text>
            </td>
            <td>
                <input type=text>
            </td>
        <tr>
        </tr>
    </table>
</body>
</html>

在此处插入标题

尝试在css中使用百分比来调整大小

<style>
input[type="text"]{
  width:10%;/* Whatever percent you want*/
}
</style>

输入[type=“text”]{
宽度:10%;/*您想要的任何百分比*/
}

输入
{ 
宽度:100%;
身高:100%;
}
还添加:

<table cellspacing="5px">

希望这对你有帮助

<table cellspacing="5px">