tid=65920& 本帖最後由 IT_man 於 2017-8-19 21:30 編輯 , a H$ R a# O
7 M7 r1 O3 e1 L1 q( E l& r
DIY調用圖片、幻燈片縮放比例圖片變形修正
7 _3 o( K& a3 n+ a4 C5 @5 K1 X- P9 i& F8 j/ s, n, A& t2 l
打開調用模版,原本我的調用模版是: X" b. V& _ [9 S l4 c% P+ \
& O# \8 z6 v6 c
<div class="module cl slidebox">
9 m% p v7 L' k$ Z <ul class="slideshow">5 p% S' G& \8 k# N% y. q+ B9 S1 r% h
[loop]
3 d- I5 G8 } w- W <li style="width: {picwidth}px; height: {picheight}px;"><a href="{url}"{target}><img src="{pic}" width="{picwidth}" height="{picheight}" /></a> <span class="title">{title}</span></li>
" ?6 V, x0 w9 s: f1 Y4 |+ a2 } [/loop]4 g8 I* E! G# T" ?. i
</ul>- Q$ A" d* ~. m( @8 |6 e) D7 I
</div>
" U6 T2 C* L7 q+ T<script type="text/javascript">
% m# v1 f+ \8 j runslideshow();4 I7 x y! ]5 e) ?% U0 Y4 k( ]
</script>
# @& o2 \7 u+ _ c1 t
6 t* D% m2 e5 }4 F5 E2 y# t1 P3 C. S- `9 M
改成
% [3 `& [# D7 ?, j9 u8 t- U. J
/ L8 J0 } i1 [) Y<div class="module cl slidebox">
& u( U9 y/ Y& S: B" ~( t4 `/ u <ul class="slideshow">1 K; W. }( l2 E' s) A) s) n
[loop]+ y, g8 y8 s6 x: g: N7 D& D) c4 Z
<li style="max-width: {picwidth}px; max-height: {picheight}px; text-align:center"><a href="{url}"{target}><img src="{pic}" max-width=" {picwidth}" max-height="{picheight}" height="{picheight}"/></a><span class="title">{title}</span></li>
+ \4 T) ~3 [' E T [/loop]
) P! N5 G. F$ w1 r# R$ o </ul>; a% @* e& s# H- f+ I
</div>) ?5 t$ h+ ^1 U8 A D& d( M
<script type="text/javascript">
2 w. \# N" `6 A" g U0 Y' N runslideshow();
+ Q( f6 N% n; B1 A! k</script>
6 J$ c- T; v& p+ u
4 ?. ]: V% ?9 k; H& R) Z u |