首页缩略图问题?

2016-07-07 15:43 来源:www.chinab4c.com 作者:ecshop专家

在后台设置缩略图大小,没有变化~
在CSS里
/*--- goods_grid ---*/
.goods_grid{ display:block; overflow:hidden; zoom:1; padding:0 0 0 4px;}
.goods_grid li{ width:106px; float:left; padding:11px 8px 9px;}
.goods_grid .img{border:1px solid #E4E4E4; width:100px; height:100px;}
.goods_grid .img img{width:100px; height:100px;}
.goods_grid .name{text-align:center; height:28px; padding-top:4px; overflow:hidden; line-height:14px; width:100px;}
.goods_grid .price{text-align:center; height:20px; width:100px; line-height:20px; overflow:hidden; }

这里修改的话~大小有改变~但是首页默认的每排6件商品~请问如何改成4件商品呢~

回答:
如果要更改图片的显示数量,需要更改css文件

/*--- goods_grid ---*/
.goods_grid2{ display:block; overflow:hidden; zoom:1; padding:0 0 0 4px;}
.goods_grid2 li{ width:165px; float:left; padding:11px 9px 9px;}
.goods_grid2 .img{border:1px solid #E4E4E4; width:158px; height:158px;}
.goods_grid2 .img img {width:158px; height:158px;}
.goods_grid2 .img a{height:158px; height:158px; display:block;}
.goods_grid2 .name{text-align:center; height:25px; overflow:hidden; line-height:25px; font-size:12px; font-weight:bold; width:158px;}
.goods_grid2 .market_price{text-decoration:line-through; color:#000;}
.goods_grid2 .price{text-align:center; font-size:12px; color:#CE2104; width:158px; line-height:20px; overflow:hidden; }

/*--- goods_grid2 ---*/
.goods_grid2{ display:block; overflow:hidden; zoom:1; padding:0 0 0 4px;}
.goods_grid2 li{ width:165px; float:left; padding:11px 9px 9px;}
.goods_grid2 .img{border:1px solid #E4E4E4; width:158px; height:158px;}
.goods_grid2 .img img {width:158px; height:158px;}
.goods_grid2 .img a{height:158px; height:158px; display:block;}
.goods_grid2 .name{text-align:center; height:25px; overflow:hidden; line-height:25px; font-size:12px; font-weight:bold; width:158px;}
.goods_grid2 .market_price{text-decoration:line-through; color:#000;}
.goods_grid2 .price{text-align:center; font-size:12px; color:#CE2104; width:158px; line-height:20px; overflow:hidden; }
/*--- goods_item ---*/
.goods_item{ display:block; overflow:hidden; zoom:1; padding:0 0 0 4px;}
.goods_item li{ width:99%; display:block; float:left; padding:11px 0 9px; border-bottom:1px #ccc dashed;}
.goods_item .img{border:1px solid #E4E4E4; float:left; width:65px; height:65px;}
.goods_item .img img{height:65px; width:65px;}
.goods_item .name{text-align:center; padding:0 10px; text-align:left; width:290px; height:40px; overflow:hidden; line-height:20px; float:left;}
.goods_item .name a:hover{color:#333;}
.goods_item .name a{font-size:13px; font-weight:bold; color:#FF6600;}
.goods_item .price{text-align:center; float:left; padding-top:8px; text-align:left; color:#CE2104; line-height:20px; overflow:hidden; }
.goods_item .market_price{text-decoration:line-through; color:#000;}
.goods_item .item_cart{float:right; padding-top:25px;}


/*--- goods_text ---*/
.goods_text{ display:block; overflow:hidden; zoom:1; padding:0 0 0 4px;}
.goods_text li{ width:99%; display:block; float:left; padding:11px 0 9px; border-bottom:1px #ccc dashed;}
.goods_text .name{text-align:center; padding:0 10px; text-align:left; width:380px; height:40px; overflow:hidden; line-height:20px; float:left;}
.goods_text .name a:hover{color:#333;}
.goods_text .name a{font-size:13px; font-weight:bold; color:#FF6600;}
.goods_text .price{text-align:center; float:left; padding-top:8px; text-align:left; color:#CE2104; line-height:20px; overflow:hidden; }
.goods_text .market_price{text-decoration:line-through; color:#000;}
.goods_text .item_cart{float:right; padding-top:16px;}



/*----- goods_info -----*/
#goods_info{width:742px; overflow:hidden; zoom:1;}
#goods_info h1{height:30px; line-height:30px; font-size:14px; color:#3366CC; margin-bottom:8px; text-align:left; border-bottom:1px #e4e4e4 dashed;}
#goods_info .img_info{width:312px; float:left;}
#goods_info .img_info .pic{width:310px; height:310px; overflow:hidden; border:1px solid #E4E4E4; text-align:center;}
#goods_info .img_info .pic a{width:310px; height:310px; display:block;}
#goods_info .text_info{width:400px; padding:0 10px 0 15px; float:left; font-size:13px;}
#goods_info .text_info .itemBtnList{display:block; padding:10px 0; height:31px; line-height:31px;}
#goods_info .text_info .itemBtnList a:hover{color:#000;}
#goods_info .text_info .itemBtnList a{height:31px; display:inline-block; margin-right:10px; float:left; line-height:31px; color:#FF6600;}
#goods_info .text_info label{margin-left:27px;}


/*----- gallery -----*/
.gallery{width:312px; padding-top:8px; margin-bottom:10px;}
.gallery .content{width:312px; height:60px; overflow:hidden;}
.gallery ul{overflow:hidden; zoom:1; white-space:nowrap; margin:0px; padding:0;}
.gallery li{height:55px; width:56px; border:1px #dfdfdf solid; float:left; margin-left:6px;}
.gallery li img{width:56px; height:55px;}
.gallery .left, .right{width:8px; height:57px; cursor:pointer;}
.gallery .left{background:url(images/img_info_bg.gif) no-repeat -24px 0; float:left;}
.gallery .right{background:url(images/img_info_bg.gif) no-repeat 0 0; float:right;}

/*----- user_comment -----*/
#user_comment .content{padding:0 10px;}
#user_comment .content ul{padding:3px 0 8px 0; overflow:hidden; zoom:1;}
#user_comment .content ul li{border-bottom:1px #f4f4f4 solid; padding:8px 0 0 0;}
#user_comment .content ul img{float:right;}
#user_comment .content p{margin-bottom:5px;}
#user_comment .content .comment_list{border:1px #e1e1e1 solid; margin:8px 0; overflow:hidden; zoom:1;}

/*----- group_buy -----*/
#group_buy li{float:left;}

/*----- goods_attr -----*/
.goods_attr .caption{height:28px; background:url(images/header_bg.gif) no-repeat 0 -331px;}
.goods_attr .caption h2{height:25px; text-align:center; width:100px; display:inline; cursor:pointer; margin-right:5px; background:#ffffff; border:1px #cccccc solid; border-bottom:none; margin-top:2px; white-space:nowrap; float:left; font-weight:bold; line-height:27px;}
.goods_attr .caption h2 span{height:25px; color:#74081F; width:100%; display:block; background:none; font-size:12px;}
.goods_attr .caption .h2bg{margin-right:5px; background:url(images/bg.gif) no-repeat -79px -254px;}
.goods_attr .caption .h2bg span{height:25px; display:block; width:100%; text-align:center; margin:0 auto; background:none; font-size:12px; color:#000; }
.goods_attr .content{padding:0 8px;}

/*----- message_list -----*/
#message_list{}
#message_list .msgBottomBorder{background:#f6f6f6; padding:4px; margin-bottom:4px; text-indent:25px;}
#message_list .gl{ width:99.5%; background:#fff4b7; border:1px #faba6d solid;}
#message_list .gl h4{font-size:12px; text-indent:10px;}

/*----- brand_list -----*/
#brand_list .content{padding:8px;}
#brand_list ul{overflow:hidden; zoom:1; margin-bottom:8px; border-left:1px #cccccc solid; border-top:1px #cccccc solid;}
#brand_list li{width:220px; height:200px; display:inline; border-right:1px #cccccc solid; border-bottom:1px #cccccc solid; overflow:hidden; float:left; padding:10px;}
#brand_list p{word-break:break-all;}

/*----- flow_user -----*/
#flow_user{width:930px; height:287px; padding:20px; background:url(images/flow_user_bg.jpg) no-repeat 0 0;}
#flow_user .flow_left{width:45%; padding:19px; float:left;}
#flow_user .flow_left h1{height:25px; line-height:25px; text-align:left; font-size:14px; color:#000;}
#flow_user .flow_left .content{color:#666666; padding-top:13px;}
#flow_user2{width:960px; height:200px; text-align:center;}


/*----- userMenu -----*/
#userMenu{width:100%; overflow:hidden; zoom:1; margin-bottom:8px;}
#userMenu h1{height:28px; overflow:hidden; text-align:center; border-bottom:1px #e4e4e4 solid; padding:0 0 0 4px; background:url(images/header_bg.gif) no-repeat 0 -331px; font-size:14px; color:#666666; font-weight:bold; line-height:28px;}
#userMenu h1 span{height:28px; width:11px; background:url(images/header_bg.gif) no-repeat -939px -116px; display:inline-block; float:right;}
#userMenu .content{border:1px #E4E4E4 solid; border-top:none; padding:5px 10px;}
#userMenu .content li{height:20px; margin-bottom:4px; line-height:20px; border-bottom:1px #cccccc dashed;}
#userMenu .content li a{height:20px; display:block; background:url(images/menuBg.gif) no-repeat 0 -30px;}
#userMenu .content .curs{ background:url(images/menuBg.gif) no-repeat 0 0;}

/*----- us_default -----*/
#us_default{width:720px; border:1px #cccccc solid; overflow:hidden; zoom:1; padding:10px;}
#us_default h5{background:#FFF5C0; font-size:13px; padding:1px 6px; color:#555555;}

图片大了之后自然排布的商品就少了,会自动换行显示

图片大了之后自然排布的商品就少了,会自动换行显示
seawind 发表于 2009-6-5 15:06


我想請問如果在首頁加大圖片的大小,應該是在那裡改呢?謝