CSS/Webkit: Background Images for Table Row

后端 未结 3 1026
Happy的楠姐
Happy的楠姐 2020-12-31 20:38

For some reason when you apply a background image to a tr in Safari/Chrome it renders it as if the rule applies to every td.

Firefox:


(source: whyp

3条回答
  •  醉梦人生
    2020-12-31 20:51

    it's bit late but, you can use "background-attachment : fixed" to solve this problem.

    and in CSS

    tr.bg {
        background-image : url(../PathToLeftBackground.png) repeat-y 50px 0px;
        background-attachment: fixed;
    }
    

    and it works!

提交回复
热议问题