html - Is it possible to set the equivalent of a src attribute of an img tag in CSS? -


Is it possible to set the src attribute value in the CSS? Currently, what I'm doing:

  & lt; Img src = "pathTo / myImage.jpg" />  

And I want to do something like this

  & lt; Img class = "myClass" />  
  .myclass {some- src = attribute: url ("pathTo / myImage.jpg");  

I want to without using background or background-image: properties in CSS .

Full task resolution ( ):

  & lt ;; Doctype html & gt; & Lt; Style & gt; .MyClass123 {Content: URL ("http://imgur.com/SZ8Cm.jpg"); } & Lt; / Style & gt; & Lt; Test and Task:  
  • Chrome 14.0.835.163
/ Li>
  • Safari 4.0.5
  • Opera 10.6
  • Checked and No :

      < Li> Firefox 40.0.2 (By looking at the Developer Network tool, you can see that the URL is loaded, but the image is not displayed)
    • Internet Explorer 11.0.9600.17905 (URL never loads)

    Comments

    Popular posts from this blog

    sql - dynamically varied number of conditions in the 'where' statement using LINQ -

    asp.net mvc - Dynamically Generated Ajax.BeginForm -

    Debug on symbian -