国内最全IT社区平台 联系我们 | 收藏本站
华晨云阿里云优惠2
您当前位置:首页 > web前端 > 特效 > css样式多背景在同一页面的设置方法

css样式多背景在同一页面的设置方法

来源:程序员人生   发布时间:2014-07-14 22:57:39 阅读次数:4687次
css样式多背景在同一页面的设置方法,下面贴出代码示例,效果页面就不演示了,大家自己测试下就可以
  1. <style> 
  2. .wfuyu{  
  3.   background-image: url(image/wfuyu.png);  
  4.   padding: 0px;  
  5.   float: left;  
  6.   height: 23px;  
  7.   width: 30px;  
  8.   margin-top: 100px;  
  9.   margin-right: 0px;  
  10.   margin-bottom: 100px;  
  11.   margin-left: 0px;  
  12.  background-repeat: no-repeat;  
  13.   background-position: left 0px;  
  14.   }  
  15. .wfuyu:hover{   
  16.   background-repeat: no-repeat;  
  17.   background-position: right bottom;  
  18.   }  
  19. .wfuyu:active{   
  20.   background-repeat: no-repeat;  
  21.   background-position: left bottom;  
  22.   }  
  23. </style> 
  24. <body> 
  25. <div class="wfuyu"></div> 

 

生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠
程序员人生
------分隔线----------------------------
分享到:
------分隔线----------------------------
关闭
程序员人生