Inkie WU
Inkie WU

Reputation: 11

CSS: Strange Edge for Color Blocks

Given a block with background color, if it's put in another color block, a strange edge is shown.

See the below image. This blue block is put in a red body. There seems to be a black border in the top and left side, while white border in the bottom and right side.

Here's the code example, live demo:

<body style="background: red;width:100vw;height:100vh;">
  <div style="background:#4CAF50; width: 150px; height: 50px;color: white;margin: 150px auto;"></div>
</body>

Upvotes: 1

Views: 250

Answers (1)

Arjun Mandloi
Arjun Mandloi

Reputation: 96

it's an optical illusion because of color's

Upvotes: 1

Related Questions