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 ...
随机推荐
- Git_基础命令
gitinit//初始化一个Git仓库" role="presentation">gitinit//初始化一个Git仓库gitinit//初始化一个Git仓库 gi ...
- bash 转换为C代码
bash 转换为C代码,并编译为可执行文件 [root@localhost ~]# wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9. ...
- QVector与QMap查找效率实战(QMap快N倍,因为QVector是数组,QMap是有序二叉树,查找的时候是N和LogN的速度对比)
因为项目使用QVector,太慢了,听说QMap比QVector查找时快,所以写一个小程序试试: 从30000个数据中找5000个 程序运行截图如下: QVector QMap 一样的数据,找一样的数 ...
- awk--基本操作
二:awk--将一行分为数个字段处理 PS:awk [option] '条件类型 {动作1} 条件类型{动作2} ...' filename PS: awk 'Pattern {action}' fi ...
- springboot2整合zookeeper集成curator
步骤: 1- pom.xml <dependency> <groupId>org.apache.curator</groupId> <artifactId&g ...
- hdu 6399 City Development
vjudge 读进来可能会有相同的\(n_i\),不过在相同的\(n_i\)中只有最后一个是有用的,所以其他的要缩起来,缩完后这些\(n\)的数量不会超过19个 可以发现一个城市的答案为所有城市初始权 ...
- ubuntu修改apt源
1.修改之前首先做好备份 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 2.编辑源列表文件 sudo vim /etc/apt/sou ...
- SpringBoot:spring boot使用Druid和监控配置
Druid是Java语言中最好的数据库连接池,并且能够提供强大的监控和扩展功能. Spring Boot默认的数据源是:org.apache.tomcat.jdbc.pool.DataSource 业 ...
- linux上如何安装mysql
下载rpm包: wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 安装rpm:rpm -ivh mysql-com ...
- numpy中与高等数学有关的函数
1.方阵的迹 方阵的迹就是方阵的主对角线元素之和 # -*- coding:utf-8 -*- # @Author: WanMingZhu # @Date: 2019/8/12 9:37 import ...