0

I've been stuck for a while trying to get this right: what i'm trying to get

Notice that there is a gradient in the borders, I tried lots of things to get it done, nothing worked.
Any idea how can I get some kind of gradients like that?

Thanks!

2
  • 1
    You can try this tool colorzilla.com/gradient-editor Commented May 13, 2017 at 2:35
  • Pretty useful, but I tried something alike the code it provides and didn't work as I wanted, thanks for the tool tho. Commented May 13, 2017 at 2:41

1 Answer 1

1

First of all its not gradient border, its the result of using box-shadow css property.

div {
  width: 300px;
  height: 50px;
  background: #222;
  border-radius: 50px;
  box-shadow: inset 0 0 20px #000;
}
<div></div>

box-shadow property takes five arguments. The first one, when left, remains as outset. The second and third are for offset and forth and fifth are spread amount and color respectively.

box-shadow: inset/outset x y spread color;
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.