【问题标题】:Increase font size of drop down list in input box HTML [duplicate]增加输入框HTML中下拉列表的字体大小[重复]
【发布时间】:2019-05-15 17:30:57
【问题描述】:

当我单击包含列表的输入框中的向下箭头时,我想增加下拉列表中项目的字体大小。

我尝试在标签中添加字体大小,在我从下拉列表中选择一个项目后,我可以看到输入框中的字体大小增加了,但我希望看到下拉项目本身更大。

带有一组列表项的输入框:

<input type="text" list="itemnames">
<datalist id="itemnames">
<option>'txt1'</option>

【问题讨论】:

    标签: html drop-down-menu inputbox


    【解决方案1】:

    字体大小选项需要在选择标签上,而不是选项标签上:

    <select style="font-size:50px;">
        <option>txt1</option>
    </select>
    

    【讨论】:

    • $ins_sql_stm = "SELECT distinct item_name FROM items_home"; $ins_sql = mysqli_query($host_connect, $ins_sql_stm); while ($row = mysqli_fetch_array($ins_sql)) { $id = $row['item_name']; echo '&lt;select style="font-size:500pt;"&gt;'; echo '&lt;option value="'.$id.'"&gt;'.$id.'&lt;/option&gt;'; echo "&lt;/select&gt;"; } 我使用mysql从表中获取数据。在我添加了 select 语句之后,我也不能增加字体大小
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-16
    • 1970-01-01
    • 2014-06-15
    • 2012-07-05
    • 2012-01-04
    • 1970-01-01
    相关资源
    最近更新 更多