Technical Tips: IE Tweaks Sources and Related Posts
Eki 30
  • Be careful when styling links if you’re using anchors. “If you use a classic anchor in your code (<a name="anchor">) you’ll notice it picks up :hover and :active pseudo-classes. To avoid this, you’ll need to either use id for anchors instead, or style with a slightly more arcane syntax: :link:hover, :link:active” [Dave Shea]
  • Define relationships for links. “The rel attribute is supposed to indicate a semantic link relationship from one resource to another.
  1. a[rel~="nofollow"]::after {
  2. content: "\2620";
  3. color: #933;
  4. font-size: x-small;
  5. }
  6. a[rel~="tag"]::after {
  7. content: url(http://www.technorati.com/favicon.ico);
  8. }
  • “These make use of the attribute selector for space separated lists of values. Any a element with a relationship containing those values will be matched. Links with the nofollow relationship will be followed by a dark red skull and crossbones (?) and those with the tag relationship will be followed by the Technocrati icon.” [Handy CSS]
  • You can mark external links automatically. Many people make use of the non-standard rel="external" relationship to indicate a link to an external site. However, adding that to each and every link is time consuming and and unnecessary. This style rule will place an north east arrow after any link on your site to an external site. [Handy CSS]
  1. a[href^="http://"]:not([href*="smashingmagazine.com"])::after {
  2. content: "\2197";
  3. }
  1. a:focus {
  2. outline: none;
  3. }

 Kaynak: Smashingmagazine



Yorum Yazın

Yorum yapmak için giriş yapmalısınız.