W3C home > Mailing lists > Public > www-style@w3.org > November 2012

Re: [css3-images] image() notation and <img>

From: Jinlong Zhang <jinlongz@oupeng.com>
Date: Thu, 22 Nov 2012 11:53:25 +0800
To: "Daniel Glazman" <daniel.glazman@disruptive-innovations.com>, www-style <www-style@w3.org>
Message-ID: <201211221153252867527@oupeng.com>
I suppose the codes below could achieve same purpose.

<style>
     #myDiv {
       background-image: url('myLogo.png');
     }
</style>

   <div id="myDiv">....</div>
   ....
   <img id="myLogo" src="myLogo.png"/>


The document have <img /> element and the <img /> has 'src' attribute. I  don't feel that need a new feature.

Greetings,
Jinlong




Zhang Jinlong --- Web Specialist

skype : jinlong3546
QQ : 237585693
Weibo : http://weibo.com/newwave




From: Daniel Glazman
Date: 2012-11-21 17:09
To: www-style@w3.org
Subject: [css3-images] image() notation and <img>
Can I write the following?

   <style>
     #myDiv {
       background-image: image('#myLogo');
     }
   </style>

   <div id="myDiv">....</div>
   ....
   <img id="myLogo" src="myLogo.png"/>

expecting the div will acquire the logo as background-image
or should the target of image() here be an image format?
I don't think the CSS Image Values and Replaced Content Level 3
spec is clear enough about this in section 3.2 and it probably
needs a clarification as a note or warning?

</Daniel>


18327_head-foot.jpg
(image/jpeg attachment: 18327_head-foot.jpg)

Received on Thursday, 22 November 2012 03:54:16 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:02 GMT