1

我正在使用 django-oembed 应用程序嵌入(在其他内容中)一些 flickr 照片:使用这个:

 {% oembed %} http://www.flickr.com/photos/majdal/3866163776/ {% endoembed %} 

将返回这个:

<img alt="Basilica di San Giorgio Maggiore" src="http://farm3.static.flickr.com/2429/3866163776_3e63cc9b49.jpg">

这很好,除了我需要为照片添加一个圆角蒙版。我知道如果图像是 a 的背景,我可以做到这一点,但是对于 {% oembed %} 标签的输出,这是不可能的。关于还有什么可以工作的任何想法?

谢谢!

4

1 回答 1

1

You could wrap the oembed tag result with a DIV element and apply styles to that:

<style type="text/css">
    div.oembed img {
        border: #fafafa 3px solid;
        border-radius: 3px;
    }
</style>

<div class="oembed">
    {% oembed %}  {{ image_url }} {% endoembed %}
</div>
于 2011-03-09T15:45:06.403 回答