本文介绍了jQuery的获取CSS属性字体权重返回数字,而不是IE中的“粗体"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用最新的jquery获取属性的字体粗细,以某种方式在IE中不起作用...在IE dev工具栏控制台上-

I'm trying to get the font-weight of a property using latest jquery, doesn't work in IE somehow... on IE dev toolbar console -

$('#ctl00_ContentPlaceHolder1').css('font-weight')

返回

700!

我检查了源代码...看不到样式格式的任何问题.可在FF中使用.

I checked in the source... can't see any problems with the style formatting. Works in FF.

推荐答案

没有什么特别之处,因为粗体是700的同义词.

Nothing out of the ordinary there, as bold is synonymous with 700.

http://www.w3.org/TR/CSS2 /fonts.html#font-boldness

这篇关于jQuery的获取CSS属性字体权重返回数字,而不是IE中的“粗体"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 05:46