本帖最後由 IT_man 於 2017-8-19 21:30 編輯
7 b$ j7 |2 k4 T+ g! T- T C' N: s- L
DIY調用圖片、幻燈片縮放比例圖片變形修正3 v' d% ^; o Y
8 f+ V0 w' X7 l6 x, O3 c打開調用模版,原本我的調用模版是:
* E# c6 v6 A F1 k& _9 D2 F' b% E+ [9 j' x! s8 n2 u$ Y) q# q4 x
<div class="module cl slidebox">
% | t' K: }7 j& Y, ] <ul class="slideshow">; S! _" m% X1 z; k4 s% @4 I
[loop]( N# I+ g$ L9 w; f+ a, Z$ r8 m
<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>
* M6 u" v q5 S' U$ p5 I- q, W [/loop]
# ?* [$ o* x( j& d: Y6 C# ^( y </ul>
5 t2 Y$ t! R4 w0 r</div>% m; {- L+ j" |
<script type="text/javascript">1 R5 _) f( V5 H: _. D6 Z! x
runslideshow();
! v( v4 H; n% s, H7 o7 e</script>$ m- B" m! @0 b! m7 I
) m6 T& w' E* s4 {
1 L/ V5 Y6 P& f4 e0 Q' x- ^改成5 U& b4 W) L/ V0 o
: h5 f, J+ ` K4 w8 j
<div class="module cl slidebox">1 A9 l6 {# I5 e
<ul class="slideshow">
, D/ O& {) U) g2 B z' r [loop]8 n" N- s. D' G. L
<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>5 R8 O! Y4 j8 m$ d1 Q4 c. m R
[/loop]
8 o! b* ?2 o/ p" | </ul>
/ H& C b* S7 b( W. ]8 a6 q; u x</div>! n7 p; [% t. B, A1 Y+ k' L
<script type="text/javascript">
$ {6 w. K) e# a runslideshow();7 B5 H# L( u, a
</script>
' Y( p- V9 n% ~' |. N
( P% y! e$ m8 R! r2 ?$ y2 U |
|