【发布时间】:2014-02-02 14:03:31
【问题描述】:
我尝试使用 PhoneGap 构建主视图。 主视图有一些包含图像和文本的按钮。 每个按钮都有以下语句:
<div ng-repeat="module in Modules" ng-click="setPage(module)" class="button" style="background-color: #ffffff;
height: 11%;
width: 60%;
margin-bottom: 3px;
margin-top: 1.5%;
opacity: 0.8;
padding-right: 0px;
padding-left: 0px;
text-align: center;
font-size: 1em;">
<img class="imgMain" ng-src={{module.IconUrl}}>
<span class="spanMain">{{module.Name}}</span>
</div>
css:
.spanMain{
font-size: 1em;
position: absolute;
bottom: 0;
right: 0;left: 0;"}
.imgMain{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 25%;
margin: auto;
max-width: 50%;
max-height: 50%;}
在 iPhone 上看起来不错,但是在 Galaxy 中, 中的模块名称(即文本)以较小的字体显示文本。 如果我将字体大小更改为更大的大小,在 iPhone 上它会显示得很大,真的不成比例,但在 Galaxy 上它还可以。我该如何解决?
非常感谢,
【问题讨论】:
-
您使用的是自定义字体吗?尝试使用为在移动设备上使用而优化的字体。字体在不同平台上呈现的效果往往完全不同。
-
我尝试使用以下值:中、大、1em、precents 你推荐什么?
-
我想知道您使用的是什么字体系列。像“Arial”还是“Helvetica”?您也可以尝试使用 px 而不是 em。
标签: jquery html css angularjs cordova