如果输入的文本太大,如何重新调整输入的大小


How to redimension an input if it's text is too large

我必须根据数组中的不同元素创建一些输入类型='submit'。问题是,如果文本太大,我希望输入增加其高度。

我编辑了这个,因为我真正需要的是将输入的文本放在 2 行而不是 1 行中。

下面是一些代码:

for($i=0;$i<count($mis_posts_sidebar);$i++)
{
    $name_sidebar = $mis_posts_sidebar[$i]->post_name;
    $title_sidebar = $mis_posts_sidebar[$i]->post_title;
    ?>
    <div id="<?php echo $name_sidebar;?>" style="border-bottom: solid 2px rgba(215, 214, 213, 0.50);">
    <input
    type="submit"
    name="<?php echo $name_sidebar;?>"
    value="<?php echo $title_sidebar;?>"
    id="<?php echo $name_sidebar;?>"
    style="font-size: 13.3pt; border: none; background-color: transparent; color: #00284b; font-weight: bold; width: 100%; text-align: left;">
</div>

输入

将始终是一行,否则您可以使用Textarea并使用CSS根据需要设置其样式。