Google Chrome 具有以下输入控件:
可以找到有关如何使用它的更多信息 here .
我需要把麦克风做得更大。如果我可以为麦克风使用自定义图像也很好。我发现调整输入元素的宽度和高度不会使麦克风变大。
最佳答案
#speech {
-webkit-transform: scale(4,4)
}
这是我的结果:
而它的 html 是:
<html>
<body>
<img src="Capture.JPG" alt="Smiley face" width="80" style="margin-top:70px; margin-left:120px; position:absolute;" />
<input style="-webkit-transform: scale(8,8); opacity:.001; width:50px; border:none; margin-left:00px; margin-top:100px;" type="text" speech="speech" x-webkit-speech="x-webkit-speech" />
</body>
</html>
无论如何,现在我可以使用事件了:
onspeechchange="processspeech();"
onwebkitspeechchange="processspeech();"
将文本放在适当的位置...
关于javascript - 如何设置 Google Chrome 语音输入控件的麦克风样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10240236/