jQuery 数据选择器字体大小问题
我刚刚实现了 jQuery & ASP .NET MVC 3 (Razor) 项目的 datapicker 内容 不知何故,datapicker 的字体大得令人难以置信。
有任何线索如何修复它吗?
谢谢你!
I just implemented jQuery & datapicker stuff for ASP .NET MVC 3 (Razor) project
and somehow the font of datapicker is incredible huge.
Any clue how to fix it?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
所有 jQuery UI 元素都可以在 jQuery UI css 文件中手动编辑,或者您可以在下载之前在 jQuery UI 站点构建您自己的自定义主题。如果您使用的是带有 Firebug 的 Chrome、Safari 或 Firefox,请右键单击日期选择器,选择“检查元素”,然后在 jQuery UI css 文件中查找您需要更改的相应代码行。如果您不确定 jQuery UI css 文件在哪里,请查看 Web 检查器中的资源以查找文件路径。
All the jQuery UI elements can be edited by hand within the jQuery UI css file, or you can build your own custom theme at the jQuery UI site before you download it. If you're using Chrome, Safari, or Firefox with Firebug, right click on the datepicker, select "inspect element", and look for the corresponding lines of code within the jQuery UI css file that you need to change. If you're not sure where your jQuery UI css file is, look at Resources in your web inspector to find the file path.
您需要对其进行“主题化”
http://jqueryui.com/demos/datepicker/#theming
使用 jQuery UI CSS 框架类的示例标记:
You will need to "theming" it
http://jqueryui.com/demos/datepicker/#theming
Sample markup with jQuery UI CSS Framework classes:
最后我找到了解决方案
Find jquery.ui.datepicker.css
Add font-size:10px;为.ui-datepicker的每一行
更改为宽度:11em;
CSS:
Finally I found the solution
Find jquery.ui.datepicker.css
Add font-size:10px; for each line of .ui-datepicker
Change with to width: 11em;
CSS:
似乎可以做到这一点。它应该被添加到主体中,但这样就不需要改变其他任何东西。
https://groups.google.com/forum/?fromgroups =#!topic/jquery-ui/pri7DPcO074
Seems to do the trick. It should be added to the body, but this way nothing else has to be changed.
https://groups.google.com/forum/?fromgroups=#!topic/jquery-ui/pri7DPcO074
某些随机 CSS 必须覆盖该元素的默认字体大小,或者完全丢失。只需重新声明它或将其显式定义为
!important
即可抵消任何其他 CSS 值。这是重新声明它的 CSS:
Some random CSS must be overwriting the default font-size for that element or its missing entirely. Just re-declare it or explicitly define it as
!important
to offset any other CSS value out there.Here is the CSS to re-declare it: