Replacing H1 text with a logo image: best method for SEO and accessibility?

前端 未结 15 2231
渐次进展
渐次进展 2020-11-28 00:16

It seems like there are a few different techniques out there, so I was hoping to get a \"definitive\" answer on this...

On a website, it\'s common practice to create

15条回答
  •  囚心锁ツ
    2020-11-28 00:39

    
    
    #header .logo h1 {
        background: red; /* replace with image of logo */
        display:block;
        height:40px; /* image height */
        width:220px; /* image width */
    }
    
    #header .logo h1 a {
        display:block;
        height:40px; /* image height */
        width:220px; /* image width */
    }
    
    #header .logo h1 a span {
        display:none;
    }
    

提交回复
热议问题