using background image for li

前端 未结 6 2388
执笔经年
执笔经年 2021-02-20 03:31

I\'m using a background image for a

  • that will be used as a button, but it\'s not fully shown; however, when write text then it shows. I don\'t want text
  • 6条回答
    •  天命终不由人
      2021-02-20 04:08

      Take a look at the following example:

         ul#footernav li { 
              display:inline; 
              }
          ul#footernav li a{ 
              display:block; 
              width:155px;
              text-indent:-9999px;
              }
          ul#footernav li.footerlocation a{ 
              height:30px ; 
              background: url('images/image.jpg') bottom left no-repeat; 
              }
          ul#footernav li.footerlocation a:hover{ 
              height:30px ; 
              background: url(images/image.jpg) top left no-repeat; 
              }
      

    提交回复
    热议问题