① ecshop購物車加減css樣式代碼怎麼樣添加
在style.css里添加下面樣式
.goods_cut{
background:url("../images/plus.gif")no-repeatscroll00transparent;
border:0none;
cursor:pointer;
display:block;
float:left;
font-size:0;
height:15px;
line-height:0;margin:8px3px0;
width:15px;
}
input.goodsBuyBox,input.number{
border:1pxsolid#DDDDDD;
float:left;
font-size:10px;
height:18px;
line-height:18px;
margin:5px6px0;
padding:0;
text-align:center;
width:32px;
}
.goods_add{
background:url("../images/plus.gif")no-repeatscroll0-15pxtransparent;
border:0none;
cursor:pointer;
display:block;
float:left;
font-size:0;
height:15px;
line-height:0;
margin:8px3px0;
width:15px;
}
在flow.dwt里,看各自的模板去修改,總之要找到這串代碼:
<input type="text" name="goods_number[{$goods.rec_id}]" ……
下面是腳本,放進flow.dwt里
<scriptlanguage="javascript"type="text/javascript">
functiongoods_cut($val){
varnum_val=document.getElementById('number'+$val);
varnew_num=num_val.value;
if(isNaN(new_num)){alert('請輸入數字');returnfalse}
varNum=parseInt(new_num);
if(Num>1)Num=Num-1;
num_val.value=Num;
document.getElementById('updatecart').click();
}
functiongoods_add($val){
varnum_val=document.getElementById('number'+$val);
varnew_num=num_val.value;
if(isNaN(new_num)){alert('請輸入數字');returnfalse}
varNum=parseInt(new_num);
Num=Num+1;
num_val.value=Num;
document.getElementById('updatecart').click();
}
</script>
找到
<input type="text" name="goods_number[{$goods.rec_id}]"
搜索不到你就搜goods_number就行了
替換為:
<spanclass="goods_cut"onclick="goods_cut('{$goods.rec_id}');"></span>
<inputtype="text"name="goods_number[{$goods.rec_id}]"id="number{$goods.rec_id}"value="{$goods.goods_number}"size="4"class="number"onblur="if(isNaN(this.value)){alert('請輸入數字');returnfalse}else{document.getElementById('updatecart').click();}"title="{$lang.goods_number_tip}"/>
<spanclass="goods_add"onclick="goods_add('{$goods.rec_id}');"></span>
找到
<input name="submit" type="submit" value="{$lang.update_cart}" class="btn_s3"/>
其實就是更新購物車的按鈕
添加一個id=「updatecart」
<input name="submit" type="submit" id="updatecart" value="{$lang.update_cart}" class="btn_s3"/>
② html5中搜索欄旁的放大鏡和購物車圖標不顯示
圖片不顯示最常見的就是路徑問題,你要確定路徑中沒中文和空格。
如果是其他原因,最好貼上代碼。
③ 這個小圖標怎麼用html代碼寫出來
<!doctypehtml>
<html>
<head>
<metacharset="utf-8">
<title>html測試問題</title>
<scriptsrc="js/jquery-1.10.2.min.js"></script>
<style>
span{
width:30px;
height:30px;
display:inline-block;
background-color:#F03;
color:#ffffff;
text-align:center;
font-size:16px;
line-height:30px;
border-radius:5px;
}
</style>
</head>
<body>
<span>新</span>
</body>
</html>
效果圖:
css3圓角效果只能在主流瀏覽器上起作用,IE8及以下不行。
④ 網站中購物車中的小購物車圖標以及個人中心前面的小圖標是直接貼的圖片還是用語言就能寫出來
就是原圖片,只不過生成了縮略圖而已
⑤ html5 css3樣式圖標怎麼做
html5 css3樣式圖標製作方法:
1、html代碼:
<div id="boxes">
<div id="boxShortcode">border-radius: 40px (shortcode)</div>
<div id="box1">border-top-right-radius: 40px (same on both axis)</div>
<div id="box2">border-top-right-radius: 20px 40px (x < y) </div>
<div id="box3">border-top-right-radius: 40px 20px (x > y) </div>
</div>
2、css樣式代碼:
#boxes div { margin-bottom: 20px; height: 50px; padding-left: 20px }
#boxShortcode {
background: cyan;
border-radius: 40px;
}
#box1 {
background: red;
border-top-right-radius: 40px;
}
#box2 {
background: yellow;
border-top-right-radius: 20px 40px;
}
#box3 {
background: lime;
border-top-right-radius: 40px 20px;
}
3、運行結果:
⑥ 怎麼用css實現購物車的飛入效果
css倒是不知道,不過jQuery中有一個animate(動畫效果)裡面會有這樣的功能
⑦ 求html購物車代碼,,效果如圖顯示
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/>
<title>修改訂單</title>
<styletype="text/css">
body{
font-size:13px;
line-height:25px;
}
table{
border-top:1pxsolid#333;
border-left:1pxsolid#333;
width:400px;
}
td{
border-right:1pxsolid#333;
border-bottom:1pxsolid#333;
text-align:center;
}
.title{
font-weight:bold;
background-color:#cccccc;
}
inputtext{
width:100px;
}
</style>
<scripttype="text/javascript">
functionaddRow(){
//行的長度
varrowlength=document.getElementById("order").rows.length;
//得到整個表格對象
varorder=document.getElementById("order").insertRow(rowlength-1);
order.id=rowlength-1;
//插入列
varcel1=order.insertCell(0).innerHTML="游戲光碟";
varcel2=order.insertCell(1).innerHTML="34";
varcel3=order.insertCell(2).innerHTML="¥58.40";
varcel4=order.insertCell(3).innerHTML="<inputtype="button"value="刪除"onclick="delRow('"+(rowlength-1)+"')"/>"+"<inputtype="button"value="修改"onclick="editRow('"+(rowlength-1)+"')"/>"
}
functiondelRow(qwe){
=document.getElementById(qwe).rowIndex;
document.getElementById("order").deleteRow(ewq);
}
functioneditRow(rowID){
varrow=document.getElementById(rowID);
varcel=row.cells;
vartext=cel[1].innerHTML;
cel[1].innerHTML="<inputtype='text'value='"+text+"'style='width:40px;'>"
cel[3].lastChild.value="確定";
cel[3].lastChild.setAttribute("onclick","update('"+rowID+"')");
}
functionupdate(qwe){
varrow=document.getElementById(qwe);
varcel=row.cells;
vartext=cel[1].lastChild.value;
cel[1].innerHTML=text;
cel[3].lastChild.value="修改";
cel[3].lastChild.setAttribute("onclick","editRow('"+qwe+"')");
}
/*
functionadd(){
vara=document.getElementById("order").rows.length;
varb=document.getElementById("order").insertRow(a-1);
varone1=b.insertCell(0).innerHTML="123";
}
*/
</script>
</head>
<body>
<tableborder="0"cellspacing="0"cellpadding="0"id="order">
<trclass="title">
<td>商品名稱</td>
<td>數量</td>
<td>價格</td>
<td>操作</td>
</tr>
<trid="1">
<td>防滑真皮休閑鞋</td>
<td>12</td>
<td>¥568.50</td>
<td><inputname="rowdel"type="button"value="刪除"onclick='delRow("1")'/>
<inputid="edit1"type="button"value="修改"onclick='editRow("1")'/></td>
</tr>
<tr>
<tdcolspan="4"style="height:30px;">
<inputname="addOrder"type="button"value="增加訂單"onclick="addRow()"/></td>
</tr>
</table>
</body>
</html>
這個是我原來上學的時候練習的代碼,練習的是基礎的jsDOM操作,不過建議以後用Jquery 比較方便 有什麼不懂得可以問我
⑧ 誰有用css3寫的icon圖標代碼啊類似這樣的
這個可以通過bootstrap-font 實現 這里有一個壓縮包,你可以打開看看。
下面這個圖片,就是相關的圖標。你可以直接使用
⑨ 如何用CSS3實現旋轉圖標特效
<img src="圖標.jpg" class='xuanzhuan' />
.xuanzhuan{animation:xz1slinearinfinite;}infinite 旋轉不限次數,也可以改成回1,旋轉一次答
@keyframesxz{
from{transform:rotate(0deg);}
to{transform:rotate(360deg);}
}
⑩ 請問天貓網站上的購物車類的小圖標是怎麼做的
應該都是一樣的呀。你在淘寶裡面能看到么,是不是沒有添加成功。