jquery - android 上的 float : how to fit the screen size

标签 jquery cordova plot flot figure

我正在尝试使用flot在 WebView 上绘制一些内容,但很难让图形根据屏幕尺寸很好地适应。似乎只接受绝对大小,当我将其更改为相对大小时,数字消失了:

<div id="placeholder" style="width:80%;height:40%;"></div>

您可以尝试的示例来自其他人:Using Flot's Bar Graph in an Android WebView with Highlighting

最佳答案

问题已解决。我必须使用设备宽度:

<div id="graphHolder" STYLE="height:200px;width:device-width"></div>

感谢 How to set device height and width for a bar chart in android

关于jquery - android 上的 float : how to fit the screen size,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9895663/

相关文章:

jquery - 简单的 JQuery 淡入淡出股票

asp.net - 如何修复 Visual Studio 2008 中的 JQuery 智能感知问题?

azure - 从 cordova 客户端将文件和元数据上传到 azure blob 存储

android - 使用 phonegap 在 Android 应用程序中覆盖密码字段

r - 将数据框打印到 pdf 文件

c# - 如何在 winform 应用程序中绘制 matlab 图?

javascript - 脚本将变量值替换到文档中

获取div信息的Javascript

android - phonegap 运行 android 不工作,没有错误消息

matlab - 如何以优雅的方式编写此代码(MATLAB 中的元胞数组和结构体)