Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/462.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 移动Safari中的HTML5米_Javascript_Html_Mobile_Mobile Safari_Modernizr - Fatal编程技术网

Javascript 移动Safari中的HTML5米

Javascript 移动Safari中的HTML5米,javascript,html,mobile,mobile-safari,modernizr,Javascript,Html,Mobile,Mobile Safari,Modernizr,我正在开发一个移动web应用程序,它需要一个仪表,最好是一个HTML5仪表。目前mobilesafari不支持meter元素,但我希望使用modernizer和Polyfill使其工作,但到目前为止我没有运气 关于如何让电表工作有什么建议吗?还是HTML5的好替代品 这是当前页面,非常简单: <!doctype html> <head> <meta charset="utf-8"> <title>untitled</title> &

我正在开发一个移动web应用程序,它需要一个仪表,最好是一个HTML5仪表。目前mobilesafari不支持meter元素,但我希望使用modernizer和Polyfill使其工作,但到目前为止我没有运气

关于如何让电表工作有什么建议吗?还是HTML5的好替代品

这是当前页面,非常简单:

<!doctype html>
<head>
<meta charset="utf-8">

<title>untitled</title>

<script src="modernizr-2.5.3.js"></script>
<script src="jquery.meterShim.js"></script>
<link rel="stylesheet" href="jquery.meterShim.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
</head>
<body>

<div id="container">
<header>
</header>

 <meter value="4" min="0" max="10">4/10</meter>

    <footer>
</footer>
</div> 
</body>
</html>

根据meter tag仅在opera和chrome中支持,作为替代,您可以使用

这是正确的,但使用Polyfills您可以使其正常工作。我找到了另一个真正起作用的填充物,我找到了另一个真正起作用的填充物。对于将来需要这样做的任何人,请尝试此polyfill: