Add URL link in CSS Background Image?

前端 未结 3 1263
暖寄归人
暖寄归人 2020-12-15 07:57

I have a CSS entry that looks like this:

.header {
    background-image: url(\"./images/embouchure.jpg\");
    background-repeat: no-repeat;
    height:160px         


        
3条回答
  •  天命终不由人
    2020-12-15 08:19

    Using only CSS it is not possible at all to add links :) It is not possible to link a background-image, nor a part of it, using HTML/CSS. However, it can be staged using this method:

    .wrapWithBackgroundImage { background-image: url(...); } .invisibleLink { display: block; left: 55px; top: 55px; position: absolute; height: 55px width: 55px; }

提交回复
热议问题