【问题标题】:Lines in a django's templatedjango 模板中的行
【发布时间】:2017-09-06 00:59:21
【问题描述】:

在django中,我有一行

                    <th class="indigo">
                        <a href="{{ req_url }}?state__iexact=validation" data-turbolinks="false">
                            <b v-text="dashboard.requests.state.daily.validation">0</b> {% trans "Notice 7 days" %}
                        </a>
                    </th>

这给了我以下图片

我想将数字0 移动到Notice 7 days 下方并增加文字的大小。谁能告诉我该怎么做?

提前致谢!

【问题讨论】:

  • 我会添加css标签,因为这个问题纯粹是关于样式

标签: css django templates


【解决方案1】:

试试这样的

<th class="indigo">
    <a href="{{ req_url }}?state__iexact=validation" data-turbolinks="false">
        {% trans "Notice 7 days" %}
        <br> <!-- This is a new line -->
        <b v-text="dashboard.requests.state.daily.validation">0</b>
    </a>
</th>

要增加大小,可以添加一些css,例如:

<style>
    .indigo {
        font-size:17px;
    }
</style>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-01-30
    • 2018-10-21
    • 2010-11-02
    • 1970-01-01
    • 2013-10-08
    • 2014-02-19
    • 2012-01-19
    • 2010-12-19
    相关资源
    最近更新 更多