为什么flex会影响iOS上的字体大小?

时间:2016-07-13 08:33:10

标签: ios css css3 safari flexbox

在Safari iOS上使用flexbox确认字体大小受到影响后,我感到非常震惊

的iOS enter image description here

桌面 enter image description here

代码



<TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:text="Best Effort"
        android:textSize="15dp"
        android:id="@+id/textView2"
        android:layout_alignBottom="@+id/newProject_switch"
        android:gravity="right|center_vertical"
        android:layout_toRightOf="@+id/newProject_switch"
        />
&#13;
a {
    font-size: 14px;
}

a + a {
    margin-left: 1em;
}

.flex {
    display: flex;
}

.float > a {
    float: left;
}

.float:after {
    content: "";
    display: block;
    clear: both;
}
&#13;
&#13;
&#13;

我在这里缺少什么?,这是一个错误吗?

1 个答案:

答案 0 :(得分:3)

因此,flex和float都会出现font-size的问题:

demo

添加此修复程序:

While running Cordova app for platform Android with options --emulator:
   Error: Command failed:                     
   /Users/vikti/dev/cordova-mapbox-test/.meteor/local/cordova-build/platforms/android/cordova/run
   --emulator
   Note: Some input files use or override a deprecated API.
   Note: Recompile with -Xlint:deprecation for details.
   Note: Some input files use or override a deprecated API.
   Note: Recompile with -Xlint:deprecation for details.

   /Users/vikti/dev/cordova-mapbox-test/.meteor/local/cordova-build/platforms/android/src/com/telerik/plugins/mapbox/CDVMapbox.java:523:
   error: diamond operator is not supported in -source 1.6
   ArrayList<String> ids = new ArrayList<>();
   ^
   (use -source 7 or higher to enable diamond operator)

   /Users/vikti/dev/cordova-mapbox-test/.meteor/local/cordova-build/platforms/android/src/com/telerik/plugins/mapbox/MapController.java:84:
   error: diamond operator is not supported in -source 1.6
   private ArrayList<String> _offlineRegionsNames = new
   ArrayList<>();
   ^
   (use -source 7 or higher to enable diamond operator)

   /Users/vikti/dev/cordova-mapbox-test/.meteor/local/cordova-build/platforms/android/src/com/telerik/plugins/mapbox/MapController.java:498:
   error: multi-catch statement is not supported in -source 1.6
   } catch (SVGParseException | IOException e) {
   ^
   (use -source 7 or higher to enable multi-catch statement)

   /Users/vikti/dev/cordova-mapbox-test/.meteor/local/cordova-build/platforms/android/src/com/telerik/plugins/mapbox/MapsManager.java:22:
   error: diamond operator is not supported in -source 1.6
   private static SparseArray<Map> _maps = new
   SparseArray<>();
   ^