Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/5.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
Google apps script 是否可以在UiApp中以不同的方式设置href小部件的样式?_Google Apps Script - Fatal编程技术网

Google apps script 是否可以在UiApp中以不同的方式设置href小部件的样式?

Google apps script 是否可以在UiApp中以不同的方式设置href小部件的样式?,google-apps-script,Google Apps Script,在UiApp中,href小部件的默认样式是经典的蓝色下划线方面。 有没有可能像css样式表和html那样定义一种新的样式 例如:链接为普通黑色,悬停时变为灰色 以下是我在css中的实现方式: h1 a:link, h1 a:active, h1 a:visited { color: #111; text-decoration: none; } h1 span { color: #111; } h1 a:hover, h1 a:focus { color: #777

在UiApp中,href小部件的默认样式是经典的蓝色下划线方面。 有没有可能像css样式表和html那样定义一种新的样式

例如:链接为普通黑色,悬停时变为灰色

以下是我在css中的实现方式:

h1 a:link, h1 a:active, h1 a:visited {
    color: #111;
    text-decoration: none;
}
h1 span {
    color: #111;
}
h1 a:hover, h1 a:focus {
    color: #777;
}

您可以通过
setStyleAttributes
设置主样式,但不能设置悬停和焦点等伪选择器样式。

您可以通过
setStyleAttributes
设置主样式,但不能设置悬停和焦点等伪选择器样式。

谢谢Corey,这正是我担心的。。。我可以用html服务来做吗?是的。HtmlService支持所有的伪选择器。总有一天我会“更新”自己到这一天:)谢谢你,科里,这就是我害怕的。。。我可以用html服务来做吗?是的。HtmlService支持所有的伪选择器。有一天我必须“更新”我自己:)谢谢