iOS中的点数与UIWebView中CSS的大小单位? [英] Points in iOS versus size units in CSS in a UIWebView?

查看:31
本文介绍了iOS中的点数与UIWebView中CSS的大小单位?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS中将HTML加载到UIWebView时,如何在CSS中获得iOS点单位?也就是说,iOS中的点单位是相对于显示器尺寸的相对尺寸度量.您如何在CSS中获得这些相对点单位?

When you load HTML into a UIWebView in iOS, how do you get iOS point units in the CSS? That is, point units within iOS are a relative size measurement, relative to the size of the display. How do you get those relative point units in CSS?

推荐答案

最初,我的程序中存在一个错误,在相当长一段时间内都未得到诊断,因此我以为CSS"pt"单元是iOS点.但是,相反,UIWebView中CSS中的"px"单位实际上对应于iOS点.

Originally, I had a bug in my program, undiagnosed for quite a while where I assumed that the CSS "pt" unit was the iOS points. But, rather, it looks like the "px" units in CSS in the UIWebView actually corresponds to iOS points.

这篇关于iOS中的点数与UIWebView中CSS的大小单位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆