A. 文字一行一行從底部飛入 html5 css3 求大神。。。
<marquee behavior="scroll" direction="up">
<div>輸入文字行1</div>
<div>輸入文字行2</div>
<div>輸入文字行3</div>
</marquee>
手打望採納
B. 怎麼用css實現購物車的飛入效果
css倒是不知道,不過jQuery中有一個animate(動畫效果)裡面會有這樣的功能
C. css有什麼辦法可以做成這樣。有白色的購物車圖片只要加黑色的背景顏色就可以了
一般前端框架來有這種,比如源bootstrap這種,實際上它是把把個別字元設計成購物車圖形,類似於另外設置了字體,把圖片設計成字體。這種的優點是方便,可以隨意在css中自定義大小顏色。缺點是用戶瀏覽網頁的時候需要預先載入這種字體,一般瀏覽器都載入特別慢或者不成功,網頁上就會有個方框,並不友好。如果網頁上類似圖標很多的話可以用這種,如果不多不如直接用背景透明的矢量圖片,也可以達到你的要求
D. 求大神解答 用css3 寫的一個菜單飛入的動畫 但是ie 兼容不了要怎麼解決呢
css3隻有在ie9或以上才可以實現,可以用js(jQuery)來寫
E. 求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 比較方便 有什麼不懂得可以問我
F. 求助:用css寫類似淘寶購物車步驟條
1、首先是計算一行的價格。這個功能在上篇博客里有提到,這里就不列舉出來了。
2、遍歷選中的幾行,將每行的數值相加。
3、將值賦給總金額顯示出來。當取消勾選或加減數量時,金額會相應改變。
G. 求助:怎麼樣用jQuery製作出一個圖片飛入購物車的動畫
給你個示例吧,應該能幫助到你
這是html
<inputid="Button1"type="button"value="button"/>
<tablestyle="width:100%;">
<tr>
<td>
<divstyle="width:100px;height:100px;border:1pxsolid#f08080"id="shop">購物車</div>
</td>
<td> </td>
<td> </td>
</tr>
<tr>
<tdstyle="height:500px"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>
<divstyle="width:50px;height:50px;background-color:#f08080"id="proct">
商品
</div>
</td>
</tr>
</table>
這個是jQuery代碼:
$(function(){
$("#Button1").click(function(){
varshopOffset=$("#shop").offset();
varcloneDiv=$("#proct").clone();
varproOffset=$("#proct").offset();
cloneDiv.css({"position":"absolute","top":proOffset.top,"left":proOffset.left});
$("#proct").parent().append(cloneDiv);
cloneDiv.animate({
left:shopOffset.left,
top:shopOffset.top
},"slow");
});
});
H. 怎麼用css javascript做出一個從左側飛入
不知道你要做什麼,無聊寫個js吧
<html>
<body>
<divid="container"style="width:800px;background-color:#8C7D65;height:100%;margin:0auto;">
<divid="fly-item"style="width:20px;height:20px;border-radius:10px;background-color:black;position:absolute;margin-top:30%;">
</div>
</body>
<script>
varobj=document.querySelector("#fly-item");
varfly_distance=0;
varjourney=780;
varinterval=setInterval(function(){
fly_distance+=1;
obj.style.marginLeft=(fly_distance+"px");
if(fly_distance>=journey){
clearInterval(interval);
alert("到終點了");
}
},10);
</script>
</html>
I. 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"/>
J. CSS布局購物車,應該如何寫呀
絕對定位,想怎麼布局就怎麼布局!