开发者

why jquery's ui.css files's font-sizes are bigger than normal?

Im looking at jqueries tabs, datepicker etc and see that font-sizes of t开发者_开发技巧he classes added to elements are like 1.1em, 1em which seems big in the page. Why did they do this like that? What is the purpose? http://jquery-ui.googlecode.com/svn/tags/latest/themes/base/jquery.ui.theme.css


em is a relativ size and depends on the next fixed font-size up the dom tree. when there is no fixed font-size it defaults to 16px.

so when you change your own css like this

body {
    font-size: 12px;
}

1em means 12px, 2em means 24px and so on.


I usually set the class ui-widget in my css like this

.ui-widget {
    font-size:80%;
}


.ui-widget {
    font-size:75% !important;
}

That code will override the default font-size. Please note the !important attribute to make sure it works.


This is the default style that someone determined, you are free to change it though using ThemeRoller. Just go under font settings on the left and adjust to what you want.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜