How can we specify src attribute of img tag in CSS?
2014-05-05 16:27
429 查看
原文:
http://stackoverflow.com/questions/2182716/how-can-we-specify-src-attribute-of-img-tag-in-css
html代码:
css样式:
但是图片不能显示。
解决办法:
加上src属性,指向一个空白图片。
http://stackoverflow.com/questions/2182716/how-can-we-specify-src-attribute-of-img-tag-in-css
html代码:
<img class="ApplicationDouble"/>
css样式:
.ApplicationDouble{background:url(../icons/application_double.png) center center no-repeat !important;}
但是图片不能显示。
解决办法:
<img src="../images/s.gif" class="ApplicationDouble"/>
加上src属性,指向一个空白图片。
相关文章推荐
- In how many ways can we select some of these coins so that they are X yen in total?
- How can I style a JavaFX SplitMenuButton in CSS
- How can I put a checkbox in a column of my DataGrid?
- How to invoke the method of managed bean and render view in JSF when we are outside the lifecycle of JSF
- How can I put a checkbox in a column of my DataGrid?
- How can i get hold of all of the visible items in my QListView?
- Question 10: Given the following program snippet, what can we conclude about the use of dynamic_cast in C++?
- How can we restrict dynamic allocation of objects of a class using new?
- Can we use function on left side of an expression in C and C++?
- How one VBA project can use an object declared in the class module of another project
- How can we double the data rate of 802.11a?
- What is default gateway? How can we find it in Linux?
- How can we identify the weights of different models for ensemble?
- Can we call the Method of a controller from another controller in asp.net MVC?
- How can I remove all "name" files in all of my subdirectories on Linux
- How can I get the IPv4 address of an interface in linux from C code ?
- Here's an example that shows how to enumerate through the features of a selection set, returning the value of each field in the attribute table except for the geometry colum.
- How to know whether the attribute belongs to one types of productin Magento?
- What can we do in the CacheMetaData Method of Activity
- How Can i Store photo (image) in column of table