Why won't my visited link have a background color?

前端 未结 5 1880
轮回少年
轮回少年 2021-01-18 23:47

It seems that a:visited won\'t work in showing background color on my links.

http://jsfiddle.net/davestein/D2srA/

What super simple thing am I missing?

5条回答
  •  甜味超标
    2021-01-19 00:26

    The background-color on a:visited only seems to work (as Dave said above, in FF, Chrome and Safari) if the normal a has a background-color, either explicitly defined or through inherit (the direct parent must actually have a background-color for this to be true).

    Obviously it is not ideal to have to define a background-color for a all the time, as the site may have a background image.

    CSS bug..?

提交回复
热议问题