当前位置: 首页 > 图文教程 > 网络编程 > Javascript > 非常简单的jQuery实现网页图片圆角

Javascript
form中限制文本字节数js代码
use jscript with List Proxy Server Information
use jscript List Installed Software
List Installed Software Features
List Information About the Binary Files Used by an Application
List the Codec Files on a Computer
List the UTC Time on a Computer
List Installed Hot Fixes
excel操作之Add Data to a Spreadsheet Cell
Add Formatted Data to a Spreadsheet
Apply an AutoFormat to an Excel Spreadsheet
JavaScript语法着色引擎(demo及打包文件下载)
类之Prototype.js学习
一款JavaScript压缩工具:X2JSCompactor
iis6+javascript Add an Extension File
jscript之Open an Excel Spreadsheet
jscript之Read an Excel Spreadsheet
jscript之List Excel Color Values
去除图像或链接黑眼圈的两种方法总结
Add a Formatted Table to a Word Document

Javascript 中的 非常简单的jQuery实现网页图片圆角


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-28   浏览: 334 ::
收藏到网摘: n/a

W3C很早就已经在CSS 3 中加入了圆角属性border-radius,但是由于某些流行浏览器的不支持,使得其还是没能被广泛使用,所以我们会想尽办法去进行更好的补充,包括背景图片的圆角实现、js圆角实现等等。但是这些方法在实现的过程中,总是会增加很多无谓的工作任务,而且还有可能无法做到浏览器之间的兼容性,那么就介绍一个非常简单的jQuery圆角实现效果吧,说是圆角有点小看它了,因为它可以实现的不止是圆角,看这张图就知道了。

非常简单的jQuery实现网页图片圆角-软晨学习网

使用jQuery圆角插件 jquery.corner 来解决这个问题,一个代码就足够了:

$('.round').corner("10px");

同样实现一个带边框的圆角效果:

$('div.rounded_box').wrap('
 
');
$('div.rounded_box').corner("round 8px").parent().css('padding', '2px').corner("round 10px");

足够简单了吧.

jQuery圆角插件演示http://malsup.com/jquery/corner/

jQuery圆角插件官方: http://www.malsup.com/jquery/corner/