我想在WebView中加载一些HTML 内容,但是它总是出现在WebView的左上角。
我也使用了stylesheet,在stylesheet中添加了 center related tages,但是也没有居中,别的tags在stylesheet 中可以正常运行。
如何把 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>