css - 调整 Google Cast 按钮的大小和样式 <google-cast-launcher>

标签 css chromecast google-cast google-cast-sdk

我有一个加载 Cast 应用程序框架的简单页面:

<script src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"></script>

此页面遵循 example for a standard cast button :

<google-cast-launcher></google-cast-launcher>

默认情况下,这个按钮很大,占据了页面的所有空间。因此,我尝试使用 CSS 调整它的大小:

google-cast-launcher {
  max-width: 2em;
}

这没有效果。设置显式 heightwidth 也是如此。

文档没有帮助:

You can apply any additional styling, such as size or positioning, to the element as necessary.

如何设置此按钮的样式?

最佳答案

这对我来说很好用。请看下面,谢谢。

google-cast 启动器{

float :右;

边距:10px 6px 14px 0px;

宽度:40px;

高度:32px;

不透明度:0.7;

背景颜色:#000;

边框:无;

大纲:无;

google-cast-launcher:hover {

--断开连接颜色:白色;

--连接颜色:白色;

关于css - 调整 Google Cast 按钮的大小和样式 <google-cast-launcher>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56208937/

相关文章:

chromecast - Chromecast 支持什么?

android - HDMI-CEC 和 Chromecast

ios - 当应用程序在后台时,如何继续收听来自 googlecast 的事件?

透明图像上的CSS背景颜色

javascript - 检查同一类的所有输入值是否为空jquery

chromecast - 使用Chromecast接收器API V2将消息从发件人发送到自定义接收器

android - 使用 Google Cast 转换时出现错误 30/300 是什么意思?

css - 当它的 child 长大时,如何使 html div 扩展?

jquery - Joomla Acymailing 订阅模块单选按钮未居中

android - Chromecast-音量进度条在电视上可见但在我的安卓移动设备上不可见