UIWebView中的空白区域 [英] White Space in UIWebView
问题描述
我正在使用 UIWebView
的应用程序。为了使 UIWebView
可编辑,我使用了一个HTML文件,并设置了它的属性 contenteditable = true
。要执行一些操作,我正在使用JavaScript。
我已经在HTML文件中设置了css。以下是代码。
< style>
#test
{
padding-left:5px;
padding-right:5px;
background-color:green;
text-align:left;
宽度:100%;
font-family:Times New Roman;
border-radius:5px;
}
< / style>
现在,我的问题是我得到了一个大约10-在 UIWebView
和加载在 UIWebView
中的HTML文件之间,从顶部,底部和左侧开始15px 。
在这里,我附上截图。
我刚刚开始在HTML和JavaScript上工作(没有先验知识),并没有得到问题所在。 正如讨论过的使用
{position:absolute; top:0px; left:0px;}
这会将HTML文件放在webview的左上角。
I am working on an app in which I am using UIWebView
. To make UIWebView
editable, I have used an HTML file and have set its attribute contenteditable=true
. To perform some operation, I am using JavaScript.
I have set css in HTML file. Below is the code.
<style>
#test
{
padding-left:5px;
padding-right:5px;
background-color:green;
text-align:left;
width:100%;
font-family: "Times New Roman";
border-radius:5px;
}
</style>
Now, my problem is I am getting a white margin of about 10-15px from top, bottom and left side
between UIWebView
and HTML file loaded in UIWebView
.
Here I am attaching screenshot for same.
I have just started working on HTML and JavaScript(no prior knowledge) and not getting where the problem is.
As discussed use
{position:absolute;top:0px;left:0px;}
This will take HTML file to top left of webview.
这篇关于UIWebView中的空白区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!