jquery的特效有哪些,jquery炫酷效果

http://www.itjxue.com  2023-01-20 00:44  来源:未知  点击次数: 

jQuery的特点

动态特效 AJAX 通过插件来扩展 方便的工具 - 例如浏览器版本判断 渐进增强 链式调用 多浏览器支持,支持Internet Explorer6.0+、Opera9.0+、Firefox2+、Safari2.0+、Chrome1.0+(在2.0.0中取消了对Internet Explorer6,7,8的支持)

html中使用jQuery和css,js的方法

首选,你要清楚css和jQuery(js)是什么。

首先,css是一种网页的样式语言,主要了解其选择器与属性设置。css是可以直接写在html页面中的,它使用的是一种style的标签(stylecss代码/style),直接在标签中写css的代码。我们称这种方式为嵌入式样式表。另外,css还可以直接作为其它标签的属性来书写(span style="color:red;"这是内联样式表/span),这样写就可以取消选择器了,但容易照成code的重复书写。最后一种是外部样式表,直接将css写在css文件中,然后通过link标签引入到网页link type="text/css" rel="stylesheet" href="css文件地址"/.

再说js,js全称是JavaScript,它是一种网页前台的程序语言,可以对网页进行想要的控制。js也是可以直接写在页面中的,它采用的是script标签,在script标签中写的就是js的code(script type="text/javascript"js代码/script)。而一般而言,我们会在外部文件中写js,js的外部关联也是通过script标签完成(script type="text/javascript" src="js文件路径"/script)。

最后,来说jQuery,jQuery是一个轻量级的js库。怎么说呢,jQuery本身也就是一种js语言,所以它的使用完全是继承js的,js的用法完全在jQuery里适用。js其实是一种很麻烦的语言,而jQuery就是将js进行了再编辑,使得通过使用jQuery能够更加方便地运用js。一般而言,使用了jQuery,原生的js语言就用得很少了。

如何使用jQuery,首先,得下载一个jQuery的js文件,(或者直接到jQuery官网copy下jQuery的code复制到自己的一个js文件中),然后在页面中,使用script标签将这个js文件引入页面中。只有先引入了jQuery的js文件,才能使用jQuery。

那么,jQuery特效呢?所谓的jQuery特效就是使用了jQuery语言编写的一个js文件了。要使用其中的一些方法什么的,与引入jQuery的js文件一样引入到页面中就可以。另外,jQuery特效可能还会有其相关的css文件和图像文件,注意这些的正确引入。

Jquery.SuperSlide 的去哪儿焦点图特效

下面是代码:

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ""

html xmlns=""

head

meta http-equiv="Content-Type" content="text/html; charset=UTF-8"

script src=""/script

script src="/jquery.SuperSlide.2.1.1.js"/script

/head

body

style type="text/css"

*{margin:0; padding:0; list-style:none; }

body{ background:#fff; font:normal 12px/22px 宋体; }

img{ border:0; }

a{ text-decoration:none; color:#333; }

a:hover{ color:#1974A1; }

.qunar { width: 728px; margin: 0 auto 15px; position: relative; overflow: hidden; } .qunar .e_pic_wrap { z-index: 1; white-space: nowrap; width: 728px; height: 215px; }

.qunar .e_pic_wrap li {position:relative; display: inline; width: 728px; height: 215px; overflow: hidden; }

.qunar .e_bg_flt { position: absolute; right: 0; top: 0; width: 270px; height: 215px; background: #000; filter: alpha(opacity=50); -moz-opacity: .5; opacity: .5; z-index: 10; }

.qunar .e_flt_inf { position: absolute; right: 0; top: 0; width: 227px; height: 180px; padding: 25px 28px 10px 15px; overflow: hidden; z-index: 20; color: #fff; white-space: normal; word-wrap: break-word; }

.qunar .e_flt_inf h2 { font: 18px/25px "微软雅黑"; }

.qunar .e_flt_inf h3 { font: 16px/22px "微软雅黑"; margin-bottom: 22px; } .qunar .e_flt_inf h3 a, .qunar .e_flt_inf h2 a { color: #fff; }

.qunar .e_flt_inf .t_info { line-height: 20px; height: 84px; overflow: hidden; }

.qunar .e_flt_inf .t_info a { color: #fff; }

.qunar .e_flt_inf .t_info .l_view { background: url(images/ico_p1.png) no-repeat scroll -120px 0; color: #fff; width: 39px; height: 14px; line-height: 14px; padding: 0 2px; display: inline-block; }

.qunar .e_sep { color: #81d6d3; position: absolute; bottom: 20px; right: 20px; width: 235px; z-index: 20; }

.qunar .e_sep a { color: #81d6d3; }

.qunar .prev, .qunar .next { position: absolute; z-index: 30; display: block; }

.qunar .prev { top: 93px; left: 10px; } .qunar .next { top: 93px; right: 10px; }

.qunar .prev a, .qunar .next a { display: block; width: 25px; height: 32px; overflow: hidden; background: url(images/ico_prevnext.png) no-repeat scroll 0 0; _background-image: url(images/ico_prevnext_ie6.png); }

.qunar .prev a { background-position: 0 0; }

.qunar .prev a:hover { background-position: 0 -40px; }

.qunar .next a { background-position: 0 -80px; }

.qunar .next a:hover { background-position: 0 -120px; }

/style

div class="qunar" style="margin:0 auto"

div class="e_pic_wrap"

ul

li a href="#" target="_blank" img src="images/1.jpg" /a

div class="e_flt_inf"

h2a href="#"恋恋温泉,秋冬泡汤指南/a/h2

h3a href="#"3折起!随时更新最赞温泉团购/a/h3

p class="t_info"a href="#"感恩月,精选全国多家超值温泉酒店,最全面的国内温泉指南!给自己和亲朋一份最养生的礼物!/aa href="#" class="l_view"去看看/a/p

/div

div class="e_bg_flt"/div

/li

li a href="#" target="_blank" img src="images/2.jpg" /a

div class="e_flt_inf"

h2a href="#"带上她 国外过圣诞迎新.../a/h2

h3a href="#"国际机票圣诞新年大抢购/a/h3

p class="t_info"a href="#"平安夜,新年,甜蜜与浪漫,带上她,度过只属于你和她的Christmas Valentine.../aa href="#" class="l_view"去看看/a/p

/div

div class="e_bg_flt"/div

/li

li a href="#" target="_blank" img src="images/3.jpg" /a

div class="e_flt_inf"

h2a href="#"暖冬温泉之旅/a/h2

h3a href="#"2012去哪儿泡汤暖心线路/a/h3

p class="t_info"a href="#"寒冷冬日,温暖的不只有爱人的怀抱。冬季出游休闲度假必选项,去哪儿温泉旅游线路精选。/aa href="#" class="l_view"去看看/a/p

/div

div class="e_bg_flt"/div

/li

li a href="#" target="_blank" img src="images/4.jpg" /a

div class="e_flt_inf"

h2a href="#"缤纷香港大放“价”/a/h2

h3a href="#"香港购物季 血拼进行时!/a/h3

p class="t_info"a href="#"动感之都,购物天堂,还等什么?让我们向香港出发!/aa href="#" class="l_view"去看看/a/p

/div

div class="e_bg_flt"/div

/li

/ul

/div

div class="prev"a href="javascript:void(0)"/a/div

div class="next"a href="javascript:void(0)"/a/div

/div

script type="text/javascript"

jQuery(".qunar").slide({ mainCell:".e_pic_wrap ul",effect:"leftLoop", autoPlay:false, delayTime:400});

/script

/body

/html

以上用到的图片、js等素材可以参考:

你贴图的网址/otherDemo/2.8/qunar.html

JQuery UI如何制作颜色动画

工具/材料

SublimeText

先打开SublimeText,然后在编辑器中添加HTML5页面,如下图所示,由于页面中中文,所以编码需要设置成utf-8的格式

接下来需要下载Jquery UI的库文件,并且在HTML中导入JqueryUI的样式库文件,如下图所示

由于颜色动画特效需要JS脚本控制,所以需要导入Jquery的脚本和Jquery ui的脚本,如下图所示。因为Jquery ui是用jquery编写的,所以先导入Jquery文件

然后在body标签中添加一个div和一个按钮。Div标签是我们要操作的颜色块,按钮用来触发动画操作,如下图所示

接下来在页面中添加style标签,并为上面设置的div颜色块来添加样式,如下图所示

然后在script标签中添加我们脚本代码,如下图所示,通过调用animate方法进行动画调用,它可以直接指定颜色块的背景颜色

最后,我们运行页面程序,你会在页面中看到一个颜色块和一个按钮,点击按钮以后,颜色块发生变化了,如下图所示

jquery制作非缘勿扰页面特效

jquery制作非缘勿扰页面特效,是可以制作的,但是需要有很强的jquery的基本和知识来完成。

非缘勿扰的页面特效很复杂的。

(责任编辑:IT教学网)

更多

推荐3DMAX教程文章