百度云盘  传送门  密码 :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. USBIP源码分析

    简介 在普通的电脑上,想使用USB设备,必须将插入到主机.USBIP却可以通过网络,让主机访问其他主机上的外部设备,而用户程序完全感知不到区别. usbip的文章在这里:https://pdfs.se ...

  2. ado.net SqlHelp类

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  3. 用git创建仓库关联本地项目,又一直上传不上去

    这个不能勾,我这边勾了用VSCODE上传不了

  4. markdown图片转换demo

    markdown图片转换demo 一直以来都是用Markdown来写博客的,但是它的图片嵌入实在是太让人头秃,逼得我能找网上的图片就不用自己的,实在是麻烦.所以我在发现了一个可以生成markdown样 ...

  5. Vue的nextTick是什么?

    公司做之前项目的时候,遇到了一些比较困惑的问题,后来研究明白了nextTick的用法. 我们先看两种情况: 第一种: export default { data () { return { msg: ...

  6. JS通过sort(),和reverse()正序和倒序

    sort()正序   var array1 = [0,1,5,10,15]; array1.sort();//结果为:0,1,10,15,5   请注意,上面的代码没有按照数值的大小对数字进行排序,要 ...

  7. HTTPS中SSL/TLS握手时的私钥用途(RSA、ECDHE)

    从上一篇HTTPS中CA证书的签发及使用过程中知道服务端在申请CA证书时只上交了密钥对中的公钥,那么只有服务端知道的私钥有什么作用呢? SSL/TLS层的位置 SSL/TLS层在网络模型的位置,它属于 ...

  8. elasticsearch设置执行脚本并添加开机启动 (转)

    elasticsearch设置执行脚本并添加开机启动 在/etc/init.d目录下新建文件elasticsearch #!/bin/sh #chkconfig: 2345 80 05 #descri ...

  9. NumPy 简介及安装

    NumPy(Numerical Python) 是 Python 语言的一个扩展程序库,支持大量的维度数组与矩阵运算,此外也针对数组运算提供大量的数学函数库.NumPy 的前身 Numeric 最早是 ...

  10. 2019-11-29-asp-dotnet-core-通过图片统计-csdn-用户访问

    title author date CreateTime categories asp dotnet core 通过图片统计 csdn 用户访问 lindexi 2019-11-29 08:26:58 ...