7

I have a CC-BY image that I'm using as a background, brought in by CSS. This image is purely there for its looks, and definitely not content. I need to put attribution on this image somewhere, and obviously it would be nicest to make this attribution a link to the kind person who provided the image. However, I don't really want to put link text into my HTML as that breaks the separation of actual content and presentation (the attribution link is really part of the presentation, I would say, since if you viewed the page without the background image, you wouldn't really want to see it).

Is there any way I can get my separation of presentation and content right here?

My current code for this looks something like


<div class='backgrounded'>
  <div class='content'><h1>Some stuff here</h1></div>
  <div class='attribution'>
    Image from <a href='http://example.com/image'>Lovely CC-BY person</a>
  </div>
</div>

And the CSS:


div.backgrounded {
    background: url(/images/an_image.jpg);
}
div.attribution {
    color: #ffffff; 
    float: right;
}

This has the attribution in the content, where I'd rather not have it.

Other things I've considered include:

  • Putting the attribution in the image itself. This solves the code separation problem, but my image is a nice wide one positioned to the left so there is enough background for a wide browser window. The bottom right of the image is almost always out of view. I don't see how I can make this attribution a link.

  • Making an image containing the attribution text and putting that where the current attribution is, again in the background, but on top I guess I could make it a link using JavaScript. This seems like a lot of fiddling about.

Is there a way out of this where my image is only referred to in the CSS? Or failing that, what's the best way to keep things nicely separated, so that, for instance, the image could be replaced without editing the HTML?

4

2 回答 2

1

您可以在 CSS 本身中留下评论:

div.backgrounded {
    background: url(/images/an_image.jpg); /*Image provided by [name]*/
}

然后属性在 CSS 中,但它不会在实际页面上可见。

于 2011-06-25T09:54:03.797 回答
1

CC-BY 许可证(可读版本)的相关位是

署名——您必须以作者或许可人指定的方式对作品进行署名(但不得以任何方式表明他们认可您或您对作品的使用)。

这使我相信,除非指定一种方式,否则您的自由裁量权是可以接受的。我认为在这个页面上做背景图片是非常合理的:在底部你会发现一个谨慎的

 site design / logo © 2011 stack exchange inc;

很容易符合CC-BY的精神。以 CC-BY 的形式在网络上发布了许多作品后,我个人的意图是“请不要假装它是您创建的”,我认为这是该许可证的常见用途。

既然你必须,根据定义,有归属信息,采取简单的方法,只是问创建者“这可以吗?”。

于 2011-06-25T09:55:53.047 回答