html - Box-shadow side-effect blur not smooth. inner square in shadow -
i have slider on page change box-shadow values. @ high blurring values there unwanted box-like breaking shadow, when supposed smooth shadow way. there anyway avoid easily? help. p. s. need work 'inset' too.

div { width:200px; height:200px; border-radius: 100px; background-color:blue; -webkit-box-shadow: 169px 129px 300px -15px rgba(0,0,0,1); -moz-box-shadow: 169px 129px 300px -15px rgba(0,0,0,1); box-shadow: 169px 129px 300px -15px rgba(0,0,0,1); } <div></div>
for circular box-shadows blur cannot go above width & height of element. spread can though.
since element 200px * 200px, maximum blur value 200px.
have below @ example doesn't go above 200px , see creates box-shadow expected
div { width: 200px; height: 200px; border-radius: 100px; background-color: blue; box-shadow: 169px 129px 200px -15px rgba(0, 0, 0, 1); } <div></div> the spread value can alternatively go above element width , height , therefore can make bigger spreads.
div { width: 200px; height: 200px; border-radius: 100px; background-color: blue; box-shadow: 169px 129px 0 250px rgba(0, 0, 0, 1); } <div></div> you didn't need prefixes since css3 box-shadows supported now. caniuse
you can read more css box shadows in mdn documentation
Comments
Post a Comment