JavaScript:设置边框半径 [英] JavaScript: Set border radius
本文介绍了JavaScript:设置边框半径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用纯JavaScript设置-moz-border-radius(没有jQuery,没有插件等)?
How can I set the -moz-border-radius with pure JavaScript (no jQuery, no plugins etc)?
document.getElementById('id')
推荐答案
尝试:
document.getElementById('id').style.borderRadius = '1em'; // w3c
document.getElementById('id').style.MozBorderRadius = '1em'; // mozilla
但为什么不在样式表中呢?
But why not do it in a stylesheet?
这篇关于JavaScript:设置边框半径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文