我加载在WebView中一些HTML内容,但它总是在我的WebView的左上角到来。如何在中心设置WebView内容?
我曾尝试使用样式表也,在我加入中心的相关产品关键词,但其在中心不来的样式表。样式表中的其他标签工作正常。
如何设置的WebView内容垂直和水平中心?
我的HTML代码
<html><head> <style type=\"text/css\"> @font-face { font-family: MyCustomFont; src:url(\"file:///android_asset/fonts/MyriadPro-Regular.otf\") } body { font-family: MyCustomFont; font-size:14; text-align: center;vertical-align:middle;line-height: normal;} </style> </head><body> Hello World </body></html>
任何链接到该网站的问题,以及相关的代码?作为第一步,您可以尝试使用android:gravity =“center”作为 – ninetwozero
。 这可能(可能不会)帮助。这就是为什么不把答案。 – akkilis