html - Inserting another image next to <img> with :before -


I & lt; Img & gt; I am trying to change the elements of emoticon with different images through CSS, so that I can match them in the style that they use). I thought I could just insert another smiley with : before css pseudo-element, and hide the original element. This will work, except that the browsers do not insert additional image! This only occurs when I & lt; Img & gt; element, when I call it & lt; Span & gt; I have tried the code:

   

Note. This specification does not fully define the interaction of the following: In future specifications, it will be defined in more detail after the replaced substances (such as IMG in HMT).

We are using a background image, as if these comments have been suggested, but the problem is that the pictures will not be printed with the default printing settings, then the next option On which we are considering & lt; Span class = "icon" & gt; & Lt; Img ... & gt; & Lt; / Span & gt; and : first over the duration, but it's a bit ugly.

I also wonder if it is specified in CSS3 so that in the near future there is a chance to fix it.

It is almost certainly easy to use:

  Img.icon: Before {display: inline-block; Background image: Transparent url (smiley.png) 0 no-repeat; Width: 16px; Height: 16px; }  

You do not want to use background-image , but : first and after: Psuedo-Elements are already implemented poorly; Trying to use the content to place images is probably one step away at this level.

I am not sure that I am seeing this point of view; It seems that you will end up with two versions of smiley.png near each other, on the server-side, it can be implemented more easily (normal smiley. Png with themed smiley.png ).


Comments