我有一个 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/