Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下代码行:
$border_width = parseInt($('#jma_border_element').css('border-width')); console.log($border_width);
例外值 5。它在 chrome 中工作,但在 firefox(18.0.2) 中是 nan
border-width不建议使用,因为四个边框都可以具有不同的宽度、样式和颜色,因此某些浏览器只能识别单个值。如果您确定它们都是相同的,那么只需使用它...
border-width
$border_width = parseInt($('#jma_border_element').css('border-left-width'), 10);