0

我有点困惑,我不明白如何为使用 cmsplugin_filer_image 放置在文本中的图像添加自定义样式?
我已按照此处的说明进行操作:https
://github.com/stefanfoulis/cmsplugin-filer#customisation 卡在我必须将 css 添加到 boxed.html 的那一刻。我正在使用<<link rel="stylesheet" href="static/cmsplugin_filer_image/css/boxed.css">,但现在无法理解从哪里放置课程boxed.css

这是boxed.html代码(我从 default.html 复制它并放在我的应用程序目录中,例如project_y/src/templates

{% load thumbnail filer_tags filer_image_tags %}{% spaceless %}
{% comment %}
    You may change the image size for special cases in your project by overriding
    this template. There are a few size manipulation filters for this in
    `filer_image_tags`:

    {% if placeholder == 'my_special_sidebar' %}
        {% thumbnail instance.image opts.size|extra_padding_y:10 crop=opts.crop upscale=opts.upscale as thumbnail %}
    {% else %}
        {% thumbnail instance.image opts.size crop=opts.crop upscale=opts.upscale as thumbnail %}
    {% endif %}
    {% if link %}<a href="{{ link }}"{% if instance.target_blank %} target="_blank"{% endif %}>{% endif %}<img{% if instance.alignment %} class="{{ instance.alignment }}"{% endif %} alt="{% if instance.alt %}{{ instance.alt }}{% endif %}" src="{{ thumbnail.url }}"{% if instance.caption %} title="{{ instance.caption }}"{% endif %} />{% if link %}</a>{% endif %}
{% endcomment %}

{% if link %}<a href="{{ link }}"{% if instance.target_blank %} target="_blank"{% endif %} class="filer_image_link">{% endif %}
{% if instance.image %}
    {% if instance.use_original_image %}
        <img class="filer_image {% if instance.alignment %}{{ instance.alignment }}{% endif %}" alt="{% if instance.alt %}{{ instance.alt }}{% endif %}" src="{{ instance.image.url }}"{% if instance.width %} width="{{ instance.width }}"{% endif %}{% if instance.height %} height="{{ instance.height }}"{% endif %}{% if instance.caption %} title="{{ instance.caption }}"{% endif %} />
    {% else %}
        {% thumbnail instance.image size crop=opts.crop upscale=opts.upscale subject_location=opts.subject_location as thumbnail %}
        <img class="filer_image {% if instance.alignment %}{{ instance.alignment }}{% endif %}" alt="{% if instance.alt %}{{ instance.alt }}{% endif %}" src="{{ thumbnail.url }}"{% if instance.width %} width="{{ instance.width }}"{% endif %}{% if instance.height %} height="{{ instance.height }}"{% endif %}{% if instance.caption %} title="{{ instance.caption }}"{% endif %} />
    {% endif %}
{% else %}
    {# just a plain link to some external image #}
    <img class="filer_image {% if instance.alignment %}{{ instance.alignment }}{% endif %}" alt="{% if instance.alt %}{{ instance.alt }}{% endif %}" src="{{ instance.image_url }}"{% if size.0 %} width="{{ size.0 }}"{% endif %}{% if size.1 %} height="{{ size.1 }}"{% endif %}{% if instance.caption %} title="{{ instance.caption }}"{% endif %} />
{% endif %}
{% if instance.caption or instance.description %}
    <span class="filer_image_info">
        {% if instance.caption %}<span class="title">{{ instance.caption }}</span>{% endif %}
        {% if instance.description %}<span class="desc">{{ instance.description }}</span>{% endif %}
    </span>
{% endif %}
{% if link %}</a>{% endif %}

{% endspaceless %}
4

1 回答 1

0

最后我决定添加float:left到网页中的所有图像。它可以在课堂上bootstrap.css或课堂上完成。bootstrap.min.cssimg

于 2015-10-09T12:51:31.193 回答