百度云盘  传送门  密码 :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)动画效果鼠标跟随的更多相关文章

  1. JS框架_(JQuery.js)绚丽的3D星空动画

    百度云盘: 传送门 密码:8ft8 绚丽的3D星空动画效果(纯CSS) (3D星空动画可以用作网页背景,Gary为文本文字) <!doctype html> <html lang=& ...

  2. JS框架_(JQuery.js)文章全屏动画切换

    百度云盘 传送门 密码:anap 文章全屏动画切换效果 <!doctype html> <html lang="zh"> <head> < ...

  3. JS框架_(JQuery.js)夜晚天空满天星星闪烁动画

    百度云盘 传送门 密码:xftr 满天星星闪烁动画效果: (可用星空动画来作为页面背景,白色文字改为文章或者其他的O(∩_∩)O) <!doctype html> <html> ...

  4. JS框架_(JQuery.js)点赞按钮动画

    百度云盘 传送门 密码: 0ihy 点赞按钮动画效果: (点击一次随机生成一颗小爱心,作为点赞动画~) <!doctype html> <html lang="en&quo ...

  5. JS框架_(JQuery.js)纯css3进度条动画

    百度云盘 传送门 密码:wirc 进度条动画效果: <!DOCTYPE html> <html lang="zh"> <head> <me ...

  6. JS框架_(JQuery.js)圆形多选菜单选项

    百度云盘 传送门 密码:zb1c 圆形多选菜单选项效果: <!DOCTYPE html> <html lang="en" > <head> &l ...

  7. JS框架_(JQuery.js)网页文字评论弹幕

    百度云盘 传送门 密码:3azl jQuery网页右下角文字评论弹幕效果 <!DOCTYPE html> <html> <head> <title>jQ ...

  8. JS框架_(JQuery.js)上传进度条

    百度云盘 传送门 密码: 1pou 纯CSS上传进度条效果: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN ...

  9. JS框架_(JQuery.js)Tooltip弹出式按钮插件

    百度云盘 传送门 密码:7eh5 弹出式按钮效果 <!DOCTYPE html> <html > <head> <meta charset="UTF ...

随机推荐

  1. gunicorn 介绍与性能分析

    阅读此文前建议先阅读 我的博客 gunicorn 是一个 python wsgi http server,只支持在 unix 系统上运行 安装 gunicorn 其实是 python 的一个包,安装方 ...

  2. Leetcode简单题

    # Title Solution Acceptance Difficulty Frequency     1 Two Sum       44.5% Easy     2 Add Two Number ...

  3. 使用CSS设置背景图片,图片比较大,完全显示在一个DIV中

    做的时候想要边框为比较好看的样式,需要UI切图并且放在div中,看起来会好看点 像这样的,我随便挑选了一个,UI帮我切图出来 需要把这个图片填到相应的div里面,但是很显然碰到一个问题,图片太大,而且 ...

  4. js 格式化 json 字符串

    1.JSON.stringify的三个参数 var json = {"@odata.context":"$metadata#AddTableOne_466281s&quo ...

  5. oracle数据库连接问题org.springframework.jdbc.support.MetaDataAccessException: JDBC DatabaseMetaData method not implemented by JDBC driver - upgrade your driver...

    org.springframework.jdbc.support.MetaDataAccessException: JDBC DatabaseMetaData method not implement ...

  6. pat (B)_1002

    1002 写出这个数 (20 分) 读入一个正整数 n,计算其各位数字之和,用汉语拼音写出和的每一位数字. 输入格式: 每个测试输入包含 1 个测试用例,即给出自然数 n 的值.这里保证 n 小于 1 ...

  7. Linux系统吃“内存”现象

    而当我们使用free命令查看Linux系统内存使用情况时,会发现内存使用一直处于较高的水平,即使此时系统并没有运行多少软件.这正是Windows和Linux在内存管理上的区别,乍一看,Linux系统吃 ...

  8. PXE自动化部署

    PXE 预启动执行环境,基于tftp条件下完成基于网络的自动化部署软件 原理: 网卡利用自身的tftp 请求dhcp 服务器获取ip和一个pxelinux.0的地址 在给定的tftp目录下存有ks的配 ...

  9. spring中对JDO的配置

    <!-- persistenceManagerFactory --> <bean id="myPmf" class="org.springframewo ...

  10. Java定时任务的几种方法(Thread 和 Timer,线程池)

    /** * 普通thread * 这是最常见的,创建一个thread,然后让它在while循环里一直运行着, * 通过sleep方法来达到定时任务的效果.这样可以快速简单的实现,代码如下: * */ ...