根据屏幕大小调整内容-网络视图-Android
我无法调整我的网页 到目前为止,我补充说根据屏幕大小调整内容-网络视图-Android,android,html,css,webview,viewport,Android,Html,Css,Webview,Viewport,我无法调整我的网页 到目前为止,我补充说 webView.getSettings().setUseWideViewPort(true); webView.getSettings().setLoadWithOverviewMode(true); 元标记 <meta content='height=device-height, width=device-width, initial-scale=1.0' name='viewport' /> 这是页面的css <
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true);
元标记
<meta content='height=device-height, width=device-width, initial-scale=1.0' name='viewport' />
这是页面的css
<style type="text/css">
html {
width : 800px;
height : 522px;
}
body {
background-color:#999999;
margin:0;
padding:0;
color:#FFFFFF;
width : 800px;
height : 522px;
font-family:Verdana, Geneva, sans-serif;
font-size:16px;
line-height:150%;
}
a{
color:#ffd901;
text-decoration:none;
}
img {
border:0;
}
#content {
position : fixed;
background-color:#FFFFFF;
overflow:hidden;
}
#accueil {
width : 800px;
height : 522px;
z-index:1;
/*
background-color:#000;
*/
background-image:url("img/fondb.jpg");
background-repeat:no-repeat;
}
#copyright{
position:absolute;
font-size:10px;
text-align:center;
left:0px;
top:500px;
width:800px;
}
#logo{
position:absolute;
left:670px;
top:410px;
}
#titre{
position:absolute;
left:50px;
top:5px;
}
#texte{
position:absolute;
left:60px;
top:77px;
}
#btn_imprimer{
position:absolute;
left:590px;
top:107px;
}
</style>
html{
宽度:800px;
高度:522px;
}
身体{
背景色:#999999;
保证金:0;
填充:0;
颜色:#FFFFFF;
宽度:800px;
高度:522px;
字体系列:Verdana,日内瓦,无衬线;
字体大小:16px;
线高:150%;
}
a{
颜色:#ffd901;
文字装饰:无;
}
img{
边界:0;
}
#内容{
位置:固定;
背景色:#FFFFFF;
溢出:隐藏;
}
#阿奎尔{
宽度:800px;
高度:522px;
z指数:1;
/*
背景色:#000;
*/
背景图片:url(“img/fondb.jpg”);
背景重复:无重复;
}
#版权所有{
位置:绝对位置;
字体大小:10px;
文本对齐:居中;
左:0px;
顶部:500px;
宽度:800px;
}
#标志{
位置:绝对位置;
左:670px;
顶部:410像素;
}
#乳头{
位置:绝对位置;
左:50px;
顶部:5px;
}
#短信{
位置:绝对位置;
左:60px;
顶部:77px;
}
#改进者{
位置:绝对位置;
左:590px;
顶部:107px;
}
这样的话
我希望我的内容适合屏幕使用双引号
<meta name="viewport" content="width=device-width,height=device-height, user-scalable=no" />
已编辑
我注意到你已经为你的
body
和html
宽度和高度设置了px值。我建议你改变这一点,这样你的正文
和html
就有宽度:100%;身高:100%代码>请参考此问题,但仍然没有更改