本帖最後由 IT_man 於 2017-8-19 21:30 編輯 3 y, B( K9 b% E4 q- o7 J. N
# L3 a* D0 {2 e3 ]- XDIY調用圖片、幻燈片縮放比例圖片變形修正
% Z' _8 g c8 ^2 U
- w' s8 A- U3 f+ \' h/ @打開調用模版,原本我的調用模版是:, j0 x( L# E% T/ j9 j- g6 U5 v% _
3 c# `7 R# ^! a: X4 R, |. e: z<div class="module cl slidebox">% W. ^# y4 v( n6 m) I
<ul class="slideshow">3 O- c9 h+ |* y/ S$ I" U
[loop]
" j$ D. I$ l7 g }6 a( u% E <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>
- h, L' `8 z3 @8 \ [/loop]
6 n {, A" k7 c2 o' z </ul>8 P ]0 f% a* d1 a$ b* ?
</div>
; f& }. E, B' f; j" A1 Y1 R<script type="text/javascript">
/ J0 a" @8 m' B9 K runslideshow();9 g+ E1 N0 t% U$ z U# U9 O9 g% P
</script>% D/ a/ y9 t: \1 n( `
q" K8 [/ F) r, z! n% ]5 _% h' V
/ \! v' ~) u4 E! p8 T/ t* V改成
b6 \% i0 t. e% i6 l& l
e7 Y0 Q# h& `8 D, m \7 d<div class="module cl slidebox">
% g& K2 _) j; W! k( k$ P! m <ul class="slideshow">
* ]6 z$ I2 J; O6 l/ b" e& a+ c$ D [loop]
$ N2 G' ` f+ m. \ <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 C0 h4 Z" O+ Q, {& U
[/loop]
5 j& J+ p! e+ N# U1 e </ul>
; u' T& k& c0 q/ x, Y C</div>; l g2 p. o1 E9 T
<script type="text/javascript">, J' W! q, x& j7 l6 u
runslideshow();
0 I# {# n6 B/ K D ]/ O* q</script> 2 U; M# I- H$ ?. ]' o
' H+ o/ J/ q; J( b9 @6 B
|
|