JS框架_(JQuery.js)动画效果鼠标跟随
百度云盘 传送门 密码 :4n9u
火狐浏览器上纯CSS_动画效果鼠标跟随效果:

(作者:lily_lcj 传送门)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>动画效果鼠标跟随</title>
<link rel="stylesheet" href="css/public.css" />
<link rel="stylesheet" href="css/style.css" />
<script type="text/javascript" src="scripts/respond.js"></script><!-- IE下兼容@media screen -->
<script type="text/javascript" src="scripts/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="scripts/sketch.min.js"></script> </head>
<body> <p>Gary</p> <!-- 鼠标跟随DIV -->
<div id="test" style="position:fixed;top:0px;z-index:20;"></div> <script language="JavaScript">
function getOs(){
var OsObject = "";
if(navigator.userAgent.indexOf("MSIE")>0) {
return "MSIE";
}
if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
$.getScript('scripts/mousefollow.js');
return "Firefox";
}
if(isSafari=navigator.userAgent.indexOf("Safari")>0) {
$.getScript('scripts/mousefollow.js');
return "Safari";
}
if(isCamino=navigator.userAgent.indexOf("Camino")>0){
$.getScript('scripts/mousefollow.js');
return "Camino";
}
if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){
$.getScript('scripts/mousefollow.js');
return "Gecko";
}
}
getOs();
</script> </body>
</html>
index.html
@charset "utf-8";
/* CSS Document */ /*==============================
CSS RESET
================================= */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td{
margin: 0;
padding: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
line-height: 1;
font-family:"Microsoft YaHei","SimHei";
font-size:12px;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after, q:before, q:after {
content: '';
content: none;
}
:focus {
outline: 0;
}
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {
display: inline-block;
}
/* Hide from IE Mac \*/
.clearfix{
display: block;
}
/* End hide from IE Mac */
.none {
display: none;
} a{text-decoration:none;} input{ -webkit-box-sizing:border-box;
-webkit-appearance: none;
}
/* End Clearfix */
public.css
@charset "utf-8";
/* CSS Document */ body{background:#222;} .border_left_none{border-left:0px!important;} #index_top img{
float:left;
height:15px;
margin-top:10px;
/*border-top:1px solid yellow;
border-bottom:1px solid yellow;*/
padding:5px;
margin-right:20px;
} #index_top p{
color:#fff;
line-height:15px;
margin-top:15px;
float:left;
font-size:14px;
font-weight:700;
padding-left:20px;
padding-right:20px;
border-left:1px solid #fff;
} @media screen and (min-width: 1200px){
.top_wrap{
width:1180px;
height:45px;
margin:0 auto;
}
} @media screen and (min-width: 960px) and (max-width: 1199px){
.top_wrap{
width:960px;
height:45px;
margin:0 auto;
}
} p {
position: fixed;
top: 50%;
left: 0;
right: 0;
text-align: center;
transform: translateY(-50%);
font-size: 40px;
font-weight: 900;
color: white;
text-shadow: 0 0 50px black;
text-transform: capitalize;
font-family: 'Roboto','Helvetica','Arial',sans-serif;
letter-spacing: 5px;
}
style.css
实现效果
getOs()获取浏览器种类,绑定js
<script language="JavaScript">
function getOs(){
var OsObject = "";
if(navigator.userAgent.indexOf("MSIE")>0) {
return "MSIE";
}
if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
$.getScript('scripts/mousefollow.js');
return "Firefox";
}
if(isSafari=navigator.userAgent.indexOf("Safari")>0) {
$.getScript('scripts/mousefollow.js');
return "Safari";
}
if(isCamino=navigator.userAgent.indexOf("Camino")>0){
$.getScript('scripts/mousefollow.js');
return "Camino";
}
if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){
$.getScript('scripts/mousefollow.js');
return "Gecko";
}
}
getOs();
</script>
window.navigator.userAgent.indexOf()获取浏览器类型和版本号的
支持:MSIE、Firefox、Safari、Camino、Gecko类型浏览器
以后等我厉害了一定要弄个兼容全部浏览器的O(∩_∩)O~
JS框架_(JQuery.js)动画效果鼠标跟随的更多相关文章
- JS框架_(JQuery.js)绚丽的3D星空动画
百度云盘: 传送门 密码:8ft8 绚丽的3D星空动画效果(纯CSS) (3D星空动画可以用作网页背景,Gary为文本文字) <!doctype html> <html lang=& ...
- JS框架_(JQuery.js)文章全屏动画切换
百度云盘 传送门 密码:anap 文章全屏动画切换效果 <!doctype html> <html lang="zh"> <head> < ...
- JS框架_(JQuery.js)夜晚天空满天星星闪烁动画
百度云盘 传送门 密码:xftr 满天星星闪烁动画效果: (可用星空动画来作为页面背景,白色文字改为文章或者其他的O(∩_∩)O) <!doctype html> <html> ...
- JS框架_(JQuery.js)点赞按钮动画
百度云盘 传送门 密码: 0ihy 点赞按钮动画效果: (点击一次随机生成一颗小爱心,作为点赞动画~) <!doctype html> <html lang="en&quo ...
- JS框架_(JQuery.js)纯css3进度条动画
百度云盘 传送门 密码:wirc 进度条动画效果: <!DOCTYPE html> <html lang="zh"> <head> <me ...
- JS框架_(JQuery.js)圆形多选菜单选项
百度云盘 传送门 密码:zb1c 圆形多选菜单选项效果: <!DOCTYPE html> <html lang="en" > <head> &l ...
- JS框架_(JQuery.js)网页文字评论弹幕
百度云盘 传送门 密码:3azl jQuery网页右下角文字评论弹幕效果 <!DOCTYPE html> <html> <head> <title>jQ ...
- JS框架_(JQuery.js)上传进度条
百度云盘 传送门 密码: 1pou 纯CSS上传进度条效果: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN ...
- JS框架_(JQuery.js)Tooltip弹出式按钮插件
百度云盘 传送门 密码:7eh5 弹出式按钮效果 <!DOCTYPE html> <html > <head> <meta charset="UTF ...
随机推荐
- MyBatis清空数据库表数据
<update id="truncateTable"> truncate table ${tableName} </update> <update i ...
- 01:keepalive高可用集群
1.1 keepalived高可用软件介绍 1.keepalived--监控检查 注:keepalive软件有两种功能:监控检查.VRRP冗余协议 1. keepalive的作用是检测web服务器的状 ...
- Java 父类的static成员在子类中的继承情况
父类的static成员在子类中的继承状况是怎么样的呢? 昨天突然想到这个问题,刚才试验了一下,发现很容易解释,没什么值得探讨的. 首先在学习继承时,书本都没有强调static成员有什么特殊的地方. 然 ...
- hadoop批量命令脚本xcall.sh及jps找不到命令解决
1.xcall.sh批量命令脚本: #!/bin/bash params=$@ i=128 for (( i=128 ; i <= 131 ; i = $i + 1 )) ; do echo = ...
- 导入excel-uploadify+npoi
总结: 导入文件时一定要给database设置栏位 虚拟表的栏位名称可以与数据库表不一致,但顺序一定要一致,因为它是按照顺序依次插入的 sheet.FirstRowNum = 0; sheet.Fir ...
- 16 Scrapy之分布式爬虫
redis分布式部署 1.scrapy框架是否可以自己实现分布式? - 不可以.原因有二. 其一:因为多台机器上部署的scrapy会各自拥有各自的调度器,这样就使得多台机器无法分配start_urls ...
- 为什么日本编程语言ruby没前途
ruby是日本的编程语言,不像日本生鱼片一样受人喜欢 日本 Ruby的性能不如.NET或Java 你又是对的!另外,Ruby比Erlang,Lua,C ++等慢,但你不使用Erlang或C ++? W ...
- dedecms 多级栏目时,调用上级栏目名称和链接
{dede:field name='position' runphp='yes'} $tc="-"; //分隔符 $tw=$GLOBALS['cfg_list_symbol']; ...
- 如何删掉git版本库master分支的第一个commit
这个操作会将库清空,一般来说在建库开始的时候操作. 适用场景: git init初始化版本库之后,提交第一个点之后发现这个点出问题了,但是此时内心如果有洁癖的话, 你会觉得不完美,很想把这个点干掉重来 ...
- QString与QByteArray互相转换的方法
本文转载自http://blog.csdn.net/daa20/article/details/51674753 // QString转QByteArray方法 //Qt5.3.2 QString s ...