功能测试

Better Compatibility When Put the Picture in the CSS than HTML

Author: FreeStar | View: | Time: 2009-6-4

Recently when make some webpages, clearly taste that put the picture in the CSS can be compatibled in more web explorer.

For example especially when use some active code (function) like : <%=News("xxx",,"<div class=""Itemindex""> <img src=Images/title.gif /><a href=""Read.Asp?NewsID="">Title</a> </div>","")%>

CSS:.Itemindex{ border-bottom:1px dashed #CCC;}

U can see the red highlighted code when the picture used in the html code, it display in the IE6 will  abate some CSS style.

But when we write like this <%=News("xxx",,"<div class=""Itemindex""> <a href=""Read.Asp?NewsID="">Title</a> </div>","")%>

CSS:.Itemindex{ border-bottom:1px dashed #CCC; background-image:url(title.gif); background-repeat:no-repeat;}

This new style can be show us all the expected look.

Entries you may like
Related Entries 相关内容:

◎welcome to give out your point。

Comments
Catalog
Copyright © 2003-2011 FreeStar, Some Rights Reserved. | Powered By ZBlog | ICP NO.08102770 | Comment Function Reopen 留言、评论功能重新开放