开发者

Manipulating oembeds in django

I'm using the django-oembed app to embed (among other content) some flickr photos: Using this:

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

will return thi开发者_如何学Cs:

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

This is excellent, except that I need to add a rounded corner mask to the photo. I know I can do that if the image was a background to a , but that's not possible with the output of the {% oembed %} tag. Any ideas on what else could work?

Thanks!


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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜