欢迎来到天天文库
浏览记录
ID:58865098
大小:146.00 KB
页数:5页
时间:2020-09-22
《商品颜色尺寸仿淘宝选择功能教程ECSHOP.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、商品颜色尺寸仿淘宝选择功能教程ECSHOP商品颜色尺寸仿淘宝选择功能教程ECSHOP原理:1:css控制本来要显示的radio为一小矩形.2:当点击此小矩形时,js使此radio选中,同时改变此小矩形的外观样式.牵涉到的修改文件(default模板为例)/themes/default/style.css/themes/default/goods.dwt注:此路径待修改模板路径.修改步骤:一:控制样式1.打开/themes/ecshop/images加添图片test.gif.2.打开/themes/ecshop/style.css最下面添加:/*---------
2、-----颜色选择器CSS添加-------------*/.catt{width:100%;height:auto;overflow:hidden;padding-bottom:5px;}.catta{border:#c8c9cd1pxsolid;text-align:center;background-color:#fff;margin-left:5px;margin-top:6px;padding-left:10px;padding-right:10px;display:block;white-space:nowrap;color:#000;text-de
3、coration:none;float:left;}.catta:hover{border:#ff67012pxsolid;margin:-1px;margin-left:4px;margin-top:5px;}.catta:focus{outline-style:none;}.catt.cattsel{border:#ff67012pxsolid;margin:-1px;background:url("images/test.gif")no-repeatbottomright;margin-left:4px;margin-top:5px;}.catt.catt
4、sela:hover{border:#ff67012pxsolid;margin:-1px;background:url("images/test.gif")no-repeatbottomright;}3.打开/themes/ecshop/goods.dwt注:以下修改以原版ecshop2.7.0版本default(模板名称)为基准未修改前第347-351行5、ame="spec_{$spec_key}"value="{$value.id}"id="spec_value_{$value.id}"{if$keyeq0}checked{/if}onclick="changePrice()"/>{$value.label}[{if$value.pricegt0}{$lang.plus}{elseif$value.pricelt0}{$lang.minus}{/if}{$value.format_price6、abs}]修改为:8、abs}]">{$value.label}9、none"id="spec_value_{$value.id}"type="radio"name="spec_{$spec_key}"value="{$value.id}"{if$keyeq0}checked{/if}/>
5、ame="spec_{$spec_key}"value="{$value.id}"id="spec_value_{$value.id}"{if$keyeq0}checked{/if}onclick="changePrice()"/>{$value.label}[{if$value.pricegt0}{$lang.plus}{elseif$value.pricelt0}{$lang.minus}{/if}{$value.format_price
6、abs}]修改为:8、abs}]">{$value.label}9、none"id="spec_value_{$value.id}"type="radio"name="spec_{$spec_key}"value="{$value.id}"{if$keyeq0}checked{/if}/>
8、abs}]">{$value.label}9、none"id="spec_value_{$value.id}"type="radio"name="spec_{$spec_key}"value="{$value.id}"{if$keyeq0}checked{/if}/>
9、none"id="spec_value_{$value.id}"type="radio"name="spec_{$spec_key}"value="{$value.id}"{if$keyeq0}checked{/if}/>
10、++){ i
此文档下载收益归作者所有