久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线

discuz手機版詳情頁,圖片自動固定大小,怎么修改?

5228 2 2提示:支持鍵盤翻頁<-左 右-> chen-johnso 發表于 2019-7-11 19:41 帖子模式

本帖最后由 chen-johnso 于 2019-7-11 19:42 編輯 discuz手機版詳情頁,圖片自動固定大小,怎么修改?默認不能全屏,固定了尺寸,可是我在源碼里面,搜索不到這個數值。 ... 查看全文

    組圖打開中,請稍候......

評論2個評論

neol發表于  2019-7-13 10:03:11
建筑資源吧 發表于 2019-7-11 20:48
觸屏版圖片尺寸設置,打開\template\default\touch\forum\discuzcode.htm文件,找

改為

贊一個!
建筑資源吧發表于  2019-7-11 20:48:04
觸屏版圖片尺寸設置,打開\template\default\touch\forum\discuzcode.htm文件,找

  1. $fix = count($post[imagelist]) == 1 ? 140 : 83;
復制代碼
改為
  1. $fix = count($post[imagelist]) == 1 ? 650 : 800;
復制代碼
也就是把140的小圖改為寬650高800這樣,差不多是最大屏幕的手機的實際尺寸。這里建議電腦版的圖片上傳時就設置最大寬度不超過700,不然加載速度會很慢。然后再找
  1. $mobilethumburl = $attach['attachimg'] && $_G['setting']['showimages'] && (!$attach['price'] || $attach['payed']) && ($_G['group']['allowgetimage'] || $_G['uid'] == $attach['uid']) ? getforumimg($attach['aid'], 0, 140, 140, 'fixnone') : '' ;
復制代碼
改為
  1. $mobilethumburl = $attach['attachimg'] && $_G['setting']['showimages'] && (!$attach['price'] || $attach['payed']) && ($_G['group']['allowgetimage'] || $_G['uid'] == $attach['uid']) ? getforumimg($attach['aid'], 0, 650, 800, 'fixnone') : '' ;
復制代碼


CSS設置,打開\static\image\mobile\style.css,找

  1. .plc .pi .message img,.plc .pi .img_one img { margin:0px 4px 0px 0; max-width:140px; max-height:140px; }
復制代碼

改為

  1. .plc .pi .message img,.plc .pi .img_one img {max-width:98%; display:block;vertical-align: middle;margin-bottom:4px;}
復制代碼

CSS也限制了高和寬,改為按屏幕尺寸的百分比來顯示。為了不撐破,別搞100%了,98%就足夠了。

  • 關注公眾號
  • 有償服務微信
  • 有償服務QQ

手機版|小黑屋|Discuz! 官方交流社區 ( 皖ICP備16010102號 |皖公網安備34010302002376號 )|網站地圖|star

GMT+8, 2025-9-18 19:13 , Processed in 0.091212 second(s), 34 queries .

Powered by Discuz! W1.0 Licensed

Copyright © 2001-2025 Discuz! Team.

關燈 在本版發帖
有償服務QQ
有償服務微信
返回頂部
快速回復 返回頂部 返回列表