我有一个加载 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;
}
这没有效果。设置显式 height
和 width
也是如此。
文档没有帮助:
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/