jquery 内边框设置


<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>jquery 内边框设置</title>
<style type="text/css">
	*{margin:0;padding:0;list-style-type:none;}
	a,img{border:0;}
	img{max-width:100%; width:auto\9; height:auto; vertical-align:middle; border:0; -ms-interpolation-mode:bicubic;}
	body{ font-family:"Microsoft yahei",arial; font-size: 14px; text-align: center;}
	.wrapper{width: 1000px; margin:50px auto; text-align:left;}
	ul{ margin:0; padding:0; list-style: none;}
	.clearfix:before,.clearfix:after{ display:table; content:'';}
	.clearfix:after{overflow: hidden; clear: both;}
	.clearfix{zoom:1;}
	.clear{clear: both;}
	.imgBox li{ width:160px; float: left; margin:0 15px 15px 0; padding:5px;}
	.imgBox li .img a{ display: block;}
	.imgBox li .img img {width: 160px; height: 160px;}
	.imgBox li .name{height: 30px; line-height: 30px; text-align: center;}
	.imgBox li .name a{color: #333; text-decoration: none;}
	.imgBox li .name a:hover{color:green; text-decoration: none;}
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script type="text/javascript">
// 插件
;(function($) {
	// 定义名称
	$.fn.borderAnimate = function(options){
		// 设置默认参数
		var defaults = {
			animated: 'easeOutElastic',		// 动画名称
			speed: 1500,						// 延迟时间
			borderClass: 'imgBd', 			// 边框的样式
			borderWidth: 5,					// 边框的宽度与长度
			borderStyle: 'dashed',			//边框的形式
			borderColor: 'orange',			// 边框的颜色
			zIndex:1
		};
		// 可自定义参数设置
		var options = $.extend({},defaults,options);
		return this.each(function(i){
			var _this = $(this);
			// 判断边框html时候存在
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值