字体大小为GWT文本框和按钮不能设置 [英] Font-size for GWT TextBox and Button can't be set
问题描述
我有一个 GWT
按钮
,我想修改字体大小
的它 15pt
。
在我的 Project.css
,我已经设置它的字体大小
。
I have a GWT
button
and I want to change the font-size
of it to 15pt
.
In my Project.css
, I have set it's font-size
.
.gwt-Button {
font-size: 15pt;
}
但这个 CSS
的风格不会改变我的巴顿字体大小
。是否有任何其他的方式我可以改变字体大小
我的按钮
?
But this CSS
style doesn't change the font-size
of my Button. Is there any other way I could change the font-size
of my button
?
推荐答案
如果您使用的是GWT的主题,它很可能会定义喜欢大小,所以你必须确保你的样式表后,无论是加载(这样它重新定义字体大小)或使用一个更具体的选择( input.gwt-按钮
的实例)。结果
这真的取决于如何,何时何地都加载样式表和/或主题样式表。
If you're using a GWT theme, it might very well define the fond-size, so you have to make sure your stylesheet is either loaded after (so it redefines the font-size) or use a more specific selector (input.gwt-Button
for instance).
It really depends how, when and where you load your stylesheet and/or the theme stylesheet.
请注意,您可以继承的< 主题名称>资源模块(例如CleanResources而不是清洁)有主题的资源复制到输出文件夹,但不会自动加载,然后加载从你的HTML主页样式表(使用<链接相对=样式表的href = ...>
就像任何样式表),所以它更容易后,把你的自定义样式
Note that you can inherit the <theme-name>Resources module (e.g. CleanResources instead of Clean) to have the theme's resources copied to the output folder but not automatically loaded, and then load the stylesheet from your HTML host page (using a <link rel=stylesheet href=…>
just like any stylesheet), so it's easier to put your custom styles after.
这篇关于字体大小为GWT文本框和按钮不能设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!