I played with him, and I think I have a solution. The following example shows how to set Box-Shadow so that it displays only the shadow to be inserted above and below the element.
Legend : insetOption leftPosition topPosition blurStrength spreadStrength color
Description
The key to doing this is to set the blur value as <= a negative spread value (for example, insert 0px 5px -? Px 5px # 000, the blur value should be -5 or lower), and also keep the blur value> 0 when subtracting from the main positioning value (for example, using the example above, the blur value should be -9 or higher, which gives us the optimal value for the blur between -5 and -9).
Decision
.styleName { background-color:#888; filter: progid:DXImageTransform.Microsoft.dropShadow(color=#FFFFCC, offX=0, offY=0, positive=true); box-shadow: inset 0px 2px -2px 2px rgba(255,255,204,0.7), inset 0px -2px -2px 2px rgba(255,255,204,0.7); -webkit-box-shadow: inset 0px 2px -2px 2px rgba(255,255,204,0.7), inset 0px -2px -2px 2px rgba(255,255,204,0.7); -moz-box-shadow: inset 0px 2px -2px 2px rgba(255,255,204,0.7), inset 0px -2px -2px 2px rgba(255,255,204,0.7); }
aheinke Oct 14 2018-11-21T00: 00Z
source share