简体   繁体   English

未在 iPad 上应用 HTML 输入文本字体系列

[英]HTML input text font-family not being applied on iPad

I have simple web page ( https://cfmeng.azurewebsites.net/cfusion/test.cfm ), in the web page, I have some text Input and each text input will show different fonts.我有一个简单的网页( https://cfmeng.azurewebsites.net/cfusion/test.cfm ),在网页中,我有一些文本输入,每个文本输入都会显示不同的字体。

This works perfectly on PC.这在PC上完美运行。 However, on iPad and Android (Sumsung), all input text shows the same font regardless what font-family setup for the input.但是,在 iPad 和 Android (Sumsung) 上,无论输入的字体系列设置如何,所有输入文本都显示相同的字体。

My goal is to use a font other than default to show the input text.我的目标是使用默认字体以外的字体来显示输入文本。

I tried我试过

<input type="text" id="fname" name="fname" style="font-family: Verdana; font-size: 20px;"><br>

<input type="text" id="fname" name="fname" style="font-family: 'Brush Script MT'; font-size: 20px;"><br>

<input type="text" id="fname" name="fname" style="font-family: Arial, Helvetica,sans-serif,'Arial Black'; font-size: 20px;"><br>

The above three shows differently on PC as you type, but exactly the same on mobile device (iPad/Android)上面三个在你打字时在PC上的显示不同,但在移动设备(iPad/Android)上完全一样

Thank you!谢谢!

George乔治

Looks like both device are missing the font-family, so it just use default fonts.看起来两个设备都缺少字体系列,所以它只使用默认字体。

I used embedded font, it worked right away on mobile devices.我使用了嵌入式字体,它可以立即在移动设备上使用。

The working url is at https://cfmeng.azurewebsites.net/cfusion/test2.cfm工作网址位于https://cfmeng.azurewebsites.net/cfusion/test2.cfm

Use Android or iPad to run this url, the result shows up correctly.使用 Android 或 iPad 运行此 url,结果正确显示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM