超容易用JS实现DIV、图片圆角效果,关键是很兼容简单

超简单用JS实现DIV、图片圆角效果,关键是很兼容简单

此代码也是从网上找的,代码很兼容,操作也很简单,只需要加载JS文件即可;附件在下面下载。

 

JS调用方法:

 

DD_roundies.addRule('.websjy1', '5px 20px 3px 10px', true);
DD_roundies.addRule('.websjy2', '5px', true);
DD_roundies.addRule('.websjy3', '500px', true);

 

 

HTML代码使用方法:

直接演示:http://www.websjy.com/bbs/viewthread.php?tid=12275

 

<div style="border:1px solid #CCCCCC; width:200px; height:200px; background:#66FFFF; margin-bottom:10px;" class="websjy1">DD_roundies.addRule('.websjy1', '5px 20px 3px 10px', true);</div>
<h3>效果2</h3>

<div style="border:1px solid #CCCCCC; width:200px; height:200px; background:#EEE; margin-bottom:10px;" class="websjy2">DD_roundies.addRule('.websjy2', '5px', true);</div>
<h3>效果3</h3>

<div style="border:1px solid #CCCCCC; width:200px; height:200px; background:#ff0000; margin-bottom:10px;" class="websjy3">DD_roundies.addRule('.websjy3', '1000px', true);</div>
 

效果:


超容易用JS实现DIV、图片圆角效果,关键是很兼容简单
 

 

下载文件: