javascript - 如何设置 Google Chrome 语音输入控件的麦克风样式

标签 javascript html css google-chrome styles

Google Chrome 具有以下输入控件:

enter image description here

可以找到有关如何使用它的更多信息 here .

我需要把麦克风做得更大。如果我可以为麦克风使用自定义图像也很好。我发现调整输入元素的宽度和高度不会使麦克风变大。

最佳答案

#speech {
  -webkit-transform: scale(4,4)
}

这是我的结果:

而它的 html 是:enter image description here

<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>

image

无论如何,现在我可以使用事件了:

 onspeechchange="processspeech();"  
 onwebkitspeechchange="processspeech();"

将文本放在适当的位置...

关于javascript - 如何设置 Google Chrome 语音输入控件的麦克风样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10240236/

相关文章:

html - 调整图像高度以匹配 flex 父高度

html - 在图像上映射一个点

javascript - 有什么方法可以知道用户是否接到电话? (Javascript)

html - 如何在响应式网站上绘图

javascript - jQuery 在容器中存在文本

javascript - jQuery、Ajax 并获取完整的 html 结构

html - Justify list-item 使它们下面有很大的差距。没有正常工作

javascript - 如何通过外部 Javascript 库(例如 jQuery)使用 Google Closure 样式表重命名?

javascript - 'http:url' 适用于所有浏览器和设备吗?

javascript - jQuery 菜单没有完全隐藏