Norway


It’s not that Martijn Cuppens used Agent sniffing, CSS hacks, or anything like that to make this quirk div. This is just a plain ol’ <> using the outline property a la:

div {
  outline: inset 0px green;
  outline-offset: -5px;
}

It looks different in different browsers because browsers literally render something differently in this strange situation.

I happened upon Reddit user spidermonk33’s comment in which they animated the offset to understand it a bit more. I took that idea and made this little video to show them behaving even weirder than the snapshots…

Direct Link to ArticlePermalink

The post The div that looks different in every browser appeared first on CSS-Tricks.



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here