Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
390 views
in Technique[技术] by (71.8m points)

Set both inset and outset box shadow using CSS

The box-shadow property has a property value called inset, so the shadow can be inset, or outset.

But how is it possible, to set both inset, and outset shadow for a div in CSS?

question from:https://stackoverflow.com/questions/22438457/set-both-inset-and-outset-box-shadow-using-css

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You need to separate them using a ,

div {
  margin: 50px;
  height: 100px;
  width: 100px;
  border: 1px solid #aaa;
  border-radius: 50%;
  box-shadow: inset 0 0 5px tomato, 0 0 5px black;
}
<div></div>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...