index.html文件是下載的效果頁面,js和css文件為修飾文件,你要使用素材,需要將js和css文件,分別放置到你的網(wǎng)頁中對應(yīng)的位置,在你的也面中引入,對應(yīng)修改引用地址。index.html文件里,有效果的原代碼,也需要相應(yīng)復(fù)制到你的頁面中。然后,通過調(diào)整css,把素材你變成你需要的樣子~

我們提供的服務(wù)有:成都網(wǎng)站設(shè)計、成都網(wǎng)站制作、微信公眾號開發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、朝天ssl等。為上千余家企事業(yè)單位解決了網(wǎng)站和推廣的問題。提供周到的售前咨詢和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的朝天網(wǎng)站制作公司
在代碼中找到你要修改的部分 要是沒有a標(biāo)簽 加個a標(biāo)簽 添加href =“你的鏈接” 就可以了,你要不會可以把代碼發(fā)給我,我給你改
jquery獲取元素索引值index()方法:
jquery的index()方法
搜索匹配的元素,并返回相應(yīng)元素的索引值,從0開始計數(shù)。
如果不給
.index()
方法傳遞參數(shù),那么返回值就是這個jQuery對象集合中第一個元素相對于其同輩元素的位置。
如果參數(shù)是一組DOM元素或者jQuery對象,那么返回值就是傳遞的元素相對于原先集合的位置。
如果參數(shù)是一個選擇器,那么返回值就是原先元素相對于選擇器匹配元素中的位置。如果找不到匹配的元素,則返回-1。
復(fù)制代碼代碼如下:
foo
bar
baz
$('li').index(document.getElementById('bar'));
//1,傳遞一個DOM對象,返回這個對象在原先集合中的索引位置
$('li').index($('#bar'));
//1,傳遞一個jQuery對象
$('li').index($('li:gt(0)'));
//1,傳遞一組jQuery對象,返回這個對象中第一個元素在原先集合中的索引位置
$('#bar').index('li');
//1,傳遞一個選擇器,返回#bar在所有l(wèi)i中的做引位置
$('#bar').index();
//1,不傳遞參數(shù),返回這個元素在同輩中的索引位置。
jquery獲取元素索引值index()示例
復(fù)制代碼代碼如下:
//用于二級或者三級聯(lián)動
建站素材
jquery特效
懶人主機
前端路上
$("#nav
a").click(function(){
//四個經(jīng)典的用法
var
index1
=
$("#nav
a").index(this);
var
index2
=
$("#nav
a").index($(this));
var
index3
=
$(this).index()
var
index3
=
$(this).index("a")
alert(index3);
return
false;
});
reset.css、index.css、jquery-1.7.2.min.js這些都是外部鏈接樣式,后綴名不變,名字自定義,一般下載了之后根據(jù)你想要的結(jié)果可以加以修改,不過js樣式改的比較少,大部分是改css樣式,!----這個符號是注釋的意思,寫在這個里面的任何東西都會不起作用,這樣備注了之后不會因為代碼太多而找不到特效的代碼,具體的你可以查看w3c規(guī)則或者是網(wǎng)上教程
這是你現(xiàn)在的結(jié)構(gòu);建議星星圖標(biāo)可以用作背景圖片;
!doctype?html
html
head
meta?charset="utf-8"
title無標(biāo)題文檔/title
script?type="text/javascript"?src=""/script
/head
body
style
*{?margin:0;?padding:0;}
ul.stars{?display:block;?margin:100px?100px?30px;?overflow:hidden;}
ul.stars?li{?display:block;?float:left;?padding:0?4px;?cursor:pointer;}
ul.stars?li?img{?display:block;?width:30px;?height:30px;}
ul.stars?li?img.full{?display:none;}
ul.stars?li.on?img.empty{?display:none;}
ul.stars?li.on?img.full{?display:block;}
/style
script
$(document).ready(function(e)?{
$("ul.stars?li").click(function(){
$(this).toggleClass("on");
var?stars?=?$("ul.stars").find("li.on").size();
$("input#stars").val(stars);
});
});
/script
form?method="get"
ul?class="stars"
li
img?class="empty"?src=";fm=26gp=0.jpg"?/
img?class="full"?src=""?/
/li
li
img?class="empty"?src=";fm=26gp=0.jpg"?/
img?class="full"?src=""?/
/li
li
img?class="empty"?src=";fm=26gp=0.jpg"?/
img?class="full"?src=""?/
/li
li
img?class="empty"?src=";fm=26gp=0.jpg"?/
img?class="full"?src=""?/
/li
li
img?class="empty"?src=";fm=26gp=0.jpg"?/
img?class="full"?src=""?/
/li
/ul
input?type="hidden"?id="stars"?name="stars"?/
input?type="submit"?value="提交"?style="margin:0?100px;"
/form
/body
/html
最好的方式是把圖片處理一下作為ul的背景圖,通過點擊li獲取索引值來改變ul的背景圖片位置;不能上傳附件了。。還是上代碼吧。。
!DOCTYPE?HTML
html
meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/
meta?http-equiv="X-UA-Compatible"?content="IE=EmulateIE7"?/
meta?name="keywords"?content=""?/
meta?name="description"?content=""?/
title評價/title
script?type="text/javascript"?src=""/script
script
$(document).ready(function(){
//星級評分
$("form?p?span.radio?label.radio").click(function(){
$(this).parent("span.radio").css("background-position-y",-($(this).index()*19)+"px");
});
});
/script
style
*{?margin:0;?padding:0;}
form?p{?display:block;?overflow:hidden;?padding:10px?20px;}
form?p?label{?display:block;?height:36px;?line-height:36px;?color:#444;?font-size:14px;?float:left;}
form?p?span.radio{?display:block;?width:150px;?height:19px;?background:url(stars.png)?left?0px?no-repeat;?float:left;?margin:8px?0?0;}
form?p?input.radio{?display:none;}
form?p?label.radio{?width:20%;?height:100%;?margin:0;?cursor:pointer;}
form?input.btn{?display:block;?width:210px;?height:36px;?line-height:36px;?*line-height:normal;?color:#fff;?font-size:15px;?background:#ffb81f;?border:0;?border-radius:6px;?cursor:pointer;?float:left;?margin-top:10px;}
/style
body
form
p
label服務(wù)態(tài)度:/label
span?class="radio"
input?class="radio"?type="radio"?name="star1"?value="0"?checked?/
label?class="radio"?for="star11"/label
label?class="radio"?for="star12"/label
label?class="radio"?for="star13"/label
label?class="radio"?for="star14"/label
label?class="radio"?for="star15"/label
input?id="star11"?class="radio"?type="radio"?name="star1"?value="1"?/
input?id="star12"?class="radio"?type="radio"?name="star1"?value="2"?/
input?id="star13"?class="radio"?type="radio"?name="star1"?value="3"?/
input?id="star14"?class="radio"?type="radio"?name="star1"?value="4"?/
input?id="star15"?class="radio"?type="radio"?name="star1"?value="5"?/
/span
/p
p
label運輸速度:/label
span?class="radio"
input?class="radio"?type="radio"?name="star2"?value="0"?checked?/
label?class="radio"?for="star21"/label
label?class="radio"?for="star22"/label
label?class="radio"?for="star23"/label
label?class="radio"?for="star24"/label
label?class="radio"?for="star25"/label
input?id="star21"?class="radio"?type="radio"?name="star2"?value="1"?/
input?id="star22"?class="radio"?type="radio"?name="star2"?value="2"?/
input?id="star23"?class="radio"?type="radio"?name="star2"?value="3"?/
input?id="star24"?class="radio"?type="radio"?name="star2"?value="4"?/
input?id="star25"?class="radio"?type="radio"?name="star2"?value="5"?/
/span
/p
p
label貨款發(fā)放:/label
span?class="radio"
input?class="radio"?type="radio"?name="star3"?value="0"?checked?/
label?class="radio"?for="star31"/label
label?class="radio"?for="star32"/label
label?class="radio"?for="star33"/label
label?class="radio"?for="star34"/label
label?class="radio"?for="star35"/label
input?id="star31"?class="radio"?type="radio"?name="star3"?value="1"?/
input?id="star32"?class="radio"?type="radio"?name="star3"?value="2"?/
input?id="star33"?class="radio"?type="radio"?name="star3"?value="3"?/
input?id="star34"?class="radio"?type="radio"?name="star3"?value="4"?/
input?id="star35"?class="radio"?type="radio"?name="star3"?value="5"?/
/span
/p
p
input?class="btn"?type="submit"?value="提交"?/
/p
/form
/body
/html
附上圖片素材
1、打開jquery。
2、導(dǎo)入素材。
3、將電影素材排列到主頁。
4、點擊編輯后臺按鈕。
5、在彈出的界面里輸入代碼就可以了。
網(wǎng)頁題目:jquery素材,jQuery模板
網(wǎng)站鏈接:http://chinadenli.net/article15/dsigsdi.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供全網(wǎng)營銷推廣、企業(yè)建站、響應(yīng)式網(wǎng)站、App開發(fā)、服務(wù)器托管、微信公眾號
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)