运行代码 缩小
汉王
HTML代码
复制 格式化 注释 注释 清空
放大
AخA
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
<title>腾讯微博app撕纸效果</title>
6
<style type="text/css">
7
body{margin:0;padding:0;font-size:14px;line-height:22px;}
8
.content,content_mack{width:300px;height:400px;overflow:hidden;font-size:12px;line-height:20px;background:#f2eee3;cursor:pointer;}
9
.content_mack{position:absolute;top:0px;left:0;}
10
.mack{position:absolute;width:300px;height:50px;overflow:hidden;top:0px;left:0px;background:#fff;}
11
.bg_sizhi{position:absolute;width:300px;height:50px;overflow:hidden;background:url('//ku.shouce.ren/files/images/201601/56a320053259f.gif');top:0px;left:0;line-height:50px;text-align:center;}
12
</style>
13
</head>
14
<body>
15
<div style="width:300px;height:400px;overflow:hidden;position: relative;float:left;">
CSS代码
复制 格式化 注释 注释 颜色 清空
放大
CSS代码...
x
 
1
JS代码
复制 格式化 注释 注释 清空
放大
JS代码...
xxxxxxxxxx
1
 
1
名称
JS模拟的腾讯微博app撕纸效果
分类
网站常用
描述
本来想用css3来实现,但后来脑袋一热就用了js,省的别人你ie怎么没效果啊!在腾讯微博app上看到的一个效果,鼠标击哪里就撕了哪里,跟撕报纸似的,任意点击左边面的灰色区域,查看效果,当时觉得很有意思,问了下高人,突然觉悟了,原来...
收藏