Loading

tp3.2替换模板中如果需要替换的图片在css样式表中怎么办?

因为标签中的 style 定义的样式可直接覆盖 css样式表中定义的样式,所以可以在要替换的标签中用 style 直接定义样式,具体代码如下:

1 <div class="aboutbg" style="background:url(/Uploads{$datu[0]['photo']}) top center no-repeat">
2     <div class="container animated bounceInUp" >
3         <h2>{$datu[0]['a_title']}</h2>
4         <p>{$datu[0]['a_remark']}</p>
5     </div>
6 </div>

 

posted @ 2017-08-04 15:20  5572  阅读(129)  评论(0编辑  收藏  举报