문제

I'm utilizing Bootstrap's glyphicon font to render icons within menu links. They have a CSS :hover effect that causes them to change color upon hover. For most of the glyphicons this works perfectly fine, but for some reason, when using the "open folder" icon, the right portion of the icon is not properly colored on hover -- it remains the default, unhovered color.

It's only happening on Safari on Mac (seems to work fine on Chrome). I've attached a screenshot. Any thoughts?

Glyphicon hover partially colored issue on Mac Safari

도움이 되었습니까?

해결책

Adjusting letter spacing seems to work.

.glyphicon{ 
  letter-spacing:3px;
}

http://jsfiddle.net/Ru8ME/8/

다른 팁

Edit: as suggested by Alex, increase the letter-spacing CSS attribute:

http://jsfiddle.net/Ru8ME/12/

From the fiddle:

.glyphicon {
  font-size: 40px;
  color: #0C6;
  letter-spacing:6px;
}
.glyphicon:hover {
  color: #F00;
}

I can confirm this works on Safari 7.0.2 and Chrome 33 for OS X!

a quick hack you could do is to add a padding.

.glyphicon-folder-open {padding-right: 10px;}

http://jsfiddle.net/5Mjq7/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top