本帖最後由 IT_man 於 2017-8-19 21:30 編輯 9 u6 W) C( q7 `7 \9 Q8 `( S& H- D4 Q
' g3 I3 V8 ?* s' g# l7 P& x
DIY調用圖片、幻燈片縮放比例圖片變形修正
+ @& \& t4 t/ ?" D9 b i" \/ c" x [( y" |8 H% `- g, F
打開調用模版,原本我的調用模版是:' x. y; v0 v0 ^3 m; b* n0 E# S
7 T5 W* c4 l/ Z/ d9 H6 K- n
<div class="module cl slidebox">" L) F5 n4 }, z @4 ?9 m
<ul class="slideshow">
* l3 `5 U4 L5 G' Z; f" F: D8 u2 V [loop]6 x, W# p# z8 D @# W) I
<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 `/ I9 p) e& X7 W; s8 o
[/loop]
: B; ] d3 K" y3 u% \ </ul>
9 L+ W5 |: b. n% p7 N4 X</div>' u! z% e% i# C# y
<script type="text/javascript">! d' E. E! f3 r' Q& X! z8 l
runslideshow();, I3 _' o2 r. T8 n; N2 J% B3 G. l2 g1 B
</script>
3 d. T; n* ^ G# t& B. f% V7 ^6 Z
, P4 y4 ]/ k( v7 d/ J: V7 t
改成
u3 ?' t2 I- w, z( j2 F8 ]% J
4 x0 S6 Q( G$ y1 p$ b0 E<div class="module cl slidebox">- _& H- m7 h' _2 }
<ul class="slideshow">
0 ~4 \5 _! A; Z q" [ m" z* v+ S [loop]
4 T& f0 e V6 U1 s <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>
3 A* Z& a1 @# m0 ? x3 Y K; v [/loop]
9 ?; E1 Q$ K% j) N/ W' ` </ul>
! p9 s! z* q0 D</div>
5 i0 c8 ]3 J% B# k" V# A2 L4 x<script type="text/javascript">
W% {. }! ^/ }; x7 B+ \% E, ] runslideshow();3 J% S$ {) y( q! n; Z- z8 b
</script>
* N+ q: J. d6 w7 {! n; P/ d" g
7 }' j+ g X; S0 D |
|