gpt4 book ai didi

html - webView 快速隐藏内容

转载 作者:行者123 更新时间:2023-11-28 07:53:44 26 4
gpt4 key购买 nike

我已经创建了一个 html 模板,我说它的宽度为 100%,但它似乎仍然隐藏了屏幕右侧的内容。该模板应该使用 webView 嵌入到 ios 应用程序中。您可以在下面看到它的外观:

enter image description here

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<style type="text/css">
body{
font-family: 'PT Sans';
margin-left:0;
margin-right:0;
margin-top: 0;
width 100%;
}
.title_div{
padding-left:5px;
padding-right:5px;
font-size:16px;
width: 100%;
word-wrap: break-word;

}

.title_div p {
display: block;
}
h3{
font-size: 26px;
padding-left:5px;
word-wrap: break-word;
margin-top: 5px;
}
.main_image {
width: 100%;
height: 200px;
background-size: cover;
}
.main_image img{
width: auto;
height: auto;

}
</style>
</head>
<body>

<div class="main_image" style="background-image:url([[[main_image]]])" title="[[[alt_desc]]]"></div>
<h3>[[[title]]]</h3>
<div class="title_div">
<p>[[[full_text]]]</p>
</div>
</body>
</html>

最佳答案

尝试将 webviews scalesPageToFit 属性设置为 YES!

关于html - webView 快速隐藏内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30244108/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com