jQuery CSS borderWidth [英] jQuery CSS borderWidth

查看:120
本文介绍了jQuery CSS borderWidth的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法获得元素的边框宽度.我尝试了以下操作,但显示为空结果.检查 http://jsfiddle.net/s7YAN/14/

I'm unable to get the border width of an element. I tried the following but it shows empty results. Check http://jsfiddle.net/s7YAN/14/

$('div').css('borderWidth');

推荐答案

borderWidth是语法糖,用于独立设置每个边框的宽度.您不能假设每个边框的宽度都相同,因此您需要询问特定边框的宽度.

borderWidth is syntactic sugar for setting each border's width independently. You can't assume that every border's width is the same, so you need to ask for a specific border's width.

$("div").css("borderTopWidth");

这篇关于jQuery CSS borderWidth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆