ios - UIWebView 文本到默认正文样式

标签 ios css fonts uiwebview

我有一个 UIWebView 用于仅在 html 网页中显示文本。它确实有以下 CSS

{ font-family: 'HelveticaNeue', 'Arial', 'Serif' }
h1 { font-family: 'HelveticaNeue-Bold'; font-size: 70px; text-transform: uppercase;}
img { width: 100%; height: auto;}
iframe { width: 100%x !important;}
.wp-smiley { width: auto !important;}
p, span { font-size: 70px; }

我可以对 css 或 iOS 应用程序代码做些什么,以便它使用默认的主体样式(例如 Font: Text Styles - Body)。

谢谢

最佳答案

要使 html 的所有元素都使用相同的字体,您需要像下面这样设置 body 标签的样式

body{ font-family: 'HelveticaNeue', 'Arial', 'Serif' }

关于ios - UIWebView 文本到默认正文样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23532512/

相关文章:

ios - 按字母顺序将数组拆分为多个数组iOS

css - 高度为 : adding padding moves the divs outside the popup 的容器弹出设置中的嵌套 div

html - CSS 内容样式

android - 在 android 应用程序中显示印地语/泰米尔语/泰卢固语文本

ios - 如何创建 SKViaPoint 的实例

ios - 保存后自动打开pdf文件

ios - 通用导航按钮操作另一个类

javascript - 猫头鹰 slider 改变 img src 打破 slider

css - React MaterialUI 动态字体加载

html - 设计 reddit 小部件的样式