HTML字体列表下拉列表

HTML字体列表下拉列表,html,select,fonts,drop-down-menu,Html,Select,Fonts,Drop Down Menu,我可以调用脚本或函数来创建字体下拉菜单吗?有很多字体吗?那么,一旦选定,它就可以用于从数据库到网站的一个应用程序中?(也就是让用户选择他们的字体类型): 更具体地说,是五种左右的标准“网络安全”字体 或者,当在html中使用这5种字体时,有人可以列出它们 例: 文本 如果您愿意,您可以完全使用css执行此操作: <select> <option class="font1"></option> <option class="font2"&g

我可以调用脚本或函数来创建字体下拉菜单吗?有很多字体吗?那么,一旦选定,它就可以用于从数据库到网站的一个应用程序中?(也就是让用户选择他们的字体类型):

更具体地说,是五种左右的标准“网络安全”字体

或者,当在html中使用这5种字体时,有人可以列出它们

例:

文本

如果您愿意,您可以完全使用css执行此操作:

<select>
    <option class="font1"></option>
    <option class="font2"></option>
    <option class="font3"></option>
    <option class="font4"></option>
    <option class="font5"></option>
</select>

<style>
    .font1 {font-family:arial}
    .font2 {font-family:monospace}
    ... etc
</style>

.font1{font-family:arial}
.font2{font系列:monospace}
... 等
另外,我会避免使用字体标签,我相信从HTML4开始就不推荐使用它了。
如果你有大量的字体,我会用PHP或你选择的其他HTML语言自动生成标记。如果您需要有关如何操作的详细信息,请告诉我。

需要更多信息。你指的是什么字体?安装在用户计算机上的字体,还是五种左右的标准或多或少的“网络安全”字体?编辑为更具体的小字体,对此表示抱歉
<select>
    <option class="font1"></option>
    <option class="font2"></option>
    <option class="font3"></option>
    <option class="font4"></option>
    <option class="font5"></option>
</select>

<style>
    .font1 {font-family:arial}
    .font2 {font-family:monospace}
    ... etc
</style>