css3 text-shadow 常用效果!

1、外发光文字

text-shadow: 0 0 0.2em #f87, 0 0 0.2em #f87;

text-1

 

2、描边文字

text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;

text-2

 

3、立体文字

text-shadow: -1px -1px #fff, 1px 1px #333;

text-3

 

4、火焰文字

text-shadow: 0 0 4px #fff, 0-5px 4px #ff3, 2px -10px 6px #fd3, -2px -15px 11px #f80, 2px -25px 18px #f20;

text-4

 

 

This entry was posted in css.

js 常用正则

手机号码正则:

var mobileReg = /^1[3|5|7|8|][0-9]{9}$/;

邮箱正则:

var emailReg = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

密码正则:

var passReg = /^[0-9a-zA-Z_]{6,20}$/;

js 判断元素是否绑定事件

<!DOCTYPE html>
<html lang=”zh-CN”>
<head>
<title></title>
<script src=”http://libs.baidu.com/jquery/1.9.0/jquery.js”></script>
</head>
<body>
<div class=”box”>1111111</div>
<script type=”text/javascript”>
$(function () {
$(“.box”).click( function () {
alert(1);
});

var ele = $._data($(“.box”)[0], “events”);
console.log(ele);
console.log(ele["click"]);
if (ele && ele["click"]) {
alert(“有绑定事件!”);
}
else {
alert(“无绑定事件!”);
}
});
</script>
</body>
</html>

This entry was posted in jquery.