我在这里需要什么 CSS 选择器?

发布于 2024-10-08 08:41:58 字数 298 浏览 7 评论 0原文

我试图将“标题”文本置于“警报”控件的中心。我现在正在使用以下 CSS:

mx|Alert{
  text-align: center;
}

问题是上面的代码也集中了我的警报内容,而不仅仅是标题文本。我需要什么选择器才能仅访问警报控件的标题?

编辑:

我正在使用 4.x SDK 和 Spark。

代码:

Alert.Show();

I'm trying to center the title text on my Alert control. I'm using the following CSS right now:

mx|Alert{
  text-align: center;
}

The problem is that the above code centers my alert content as well, not just the title text. What selector do I need to access just the title of the alert control?

Edit:

I'm using the 4.x SDK and Spark.

Code:

Alert.Show();

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

埋葬我深情 2024-10-15 08:41:58

使用 titleStyleName 声明一个可用于设置标题样式的 CSS 类,然后向该类添加样式:

mx|Alert {
    titleStyleName: 'alertTitle';
}

.alertTitle {
    text-align: center;
}

如果我没记错的话,应该适用于 Spark。

Use titleStyleName to declare a CSS class that can be used to style the title, then add styles to that class:

mx|Alert {
    titleStyleName: 'alertTitle';
}

.alertTitle {
    text-align: center;
}

Should work for Spark if I'm not wrong.

仙气飘飘 2024-10-15 08:41:58

看一下 标题样式名称

Take a look at titleStyleName.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文