动态 版块 发帖 消息 我的
xwylt
书山有路勤为径,学海无涯苦作舟
lytcreateLv13   
django模板判断奇偶     
{% for a in articles_bottom %}
    {% if forloop.counter|divisibleby:"2" %}
    <div class="life-style-right-grid">
    {% else %}
    <div class="life-style-left-grid">
    {% endif %}
    <a href="single.html"><img src="static/images/l2.jpg" alt=""/></a>
    <a class="title" href="/single">这里是一长句话的新闻简介</a>
</div>
{% endfor %}

 0  已被阅读了55次  楼主 2021-03-30 16:43:34
回复列表

回复:django模板判断奇偶

Powered by Xwylt.com
© 2020-2021 lytcreate
您的IP:18.232.53.118,2021-04-23 01:13:39,Processed in 0.00797 second(s).
Powered by HadSky
书山有路勤为径,学海无涯苦作舟
已有0次打赏