GWT - 使用自定义样式设置对话框样式
我已经构建了一个自定义对话框。所有功能都工作正常,但只有一件事让我非常沮丧。我已为此对话框设置自定义样式类。它在 IE 中工作得很好,但是当使用 chrome 浏览器时,我看不到我的样式被应用。
例如 - 我将对话框的背景颜色设置为黑色,边框颜色设置为黑色。当我使用 chrome 时,我没有看到任何这些样式。
谁能帮我弄清楚这里发生了什么事吗?
I have built a custom dialog box. All the functionality is just working fine but only one thing is frustrating me a lot. I have set custom style class to this dialog box. It works perfectly fine in IE but when using chrome browser i do not see my styles being applied.
Like for example - I have the background color of the dialog box as black and border of color black. I do not see any of these styles when i use chrome.
Can anyone help me figure out whats going on here ??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Chrome 有一些优秀的调试工具。例如,您可以右键单击对话框中的元素并选择“检查元素”。右侧将详细介绍如何应用 CSS 样式。
从这里您可以调试为什么元素的样式是这样的。您会注意到奇怪的 CSS 样式,其名称类似于“FJDLKSJFLKDSJF”。这些是 GWT 创建的样式,通常在 UIBinder 布局中。其他样式将被命名为“GWT-DecolatedPanel”之类的名称。这些样式是用于主题 GWT 小部件的样式,并且可以被覆盖。
如果没有看到您的特定 CSS,除了这些提示之外很难提供任何进一步的帮助。
Chrome has some excellent debugging tools. For instance, you can right click on an element in your dialog box and choose "Inspect element". On the right it will give you a complete breakdown of how CSS styles were applied to it.
From here you can debug why an element is styled the way it is. You'll notice strange CSS styles named things like "FJDLKSJFLKDSJF". These are styles that GWT created, usually in a UIBinder layout. Other styles will be named things like "GWT-DecoratedPanel". These styles are styles that are used to theme GWT widgets and can be over-ridden.
Without seeing your specific CSS, it's hard to help any further than these hints.