dasherize() -> string
将字符串中的下划线全部替换为横线("_"
替换为 "-"
)。
'border_bottom_width'.dasherize();
// -> 'border-bottom-width'
为将一个 DOM style
属性转换为它等价的 CSS 属性,请联合使用使用 String#underscore 和 String#dasherize
方法。
'borderBottomWidth'.underscore().dasherize();
// -> 'border-bottom-width'