jquery - Circular CSS shape with drop shadow and border-bottom -


update found out elliptical border radius. achieved same result looking for, border thickens ellipsis if know's better approach i'm still looking. here's jsfiddle - result looks fiddle result

code used in fiddle

border-bottom: 3px solid green; -moz-border-radius-bottomleft: 70% 40px; -webkit-border-bottom-left-radius: 70% 40px; -webkit-box-shadow: 0 3px 7px 0 rgba(0,0,0,0.91) ; box-shadow: 0 3px 7px 0 rgba(0,0,0,0.91) ; 

original post

i wondering if possible create shape similar 1 below

imgur of shape

the shape overlaping image. know create recntagular div border-bottom-left-radius give border-bottom: 3px solid green , drop-shadow, border radius doesn't achieve same "angle" 1 in image above..

i thought use svg, can't have drop shadow.. if there way create shape drop shadow open suggestions. thank you

border-radius

you add same style border-radius right, taking other 30% have left over.

body {    background: lightblue;  }  #box {    width: 500px;    height: auto;    border-bottom: 3px solid green;    -moz-border-radius-bottomleft: 70% 40px;    -webkit-border-bottom-left-radius: 70% 40px;    -moz-border-radius-bottomright: 30% 20px;    -webkit-border-bottom-right-radius: 30% 20px;    -webkit-box-shadow: 0 3px 7px 0 rgba(0, 0, 0, 0.91);    box-shadow: 0 3px 7px 0 rgba(0, 0, 0, 0.91);  }
<img id="box" src="http://www.hdwallpapersinn.com/wp-content/uploads/2014/11/sunset-cityscape-scene.jpg" />

clip-path

you using clip-path area want. sadly, doesn't allow box-shadows

body {    background: lightblue;  }  .container {    -webkit-clip-path: ellipse(100% 56% @ 71% 39%);    clip-path: ellipse(100% 56% @ 71% 39%);    width: 500px;    height: auto;    background: green;  }  img {    -webkit-clip-path: ellipse(100% 56% @ 71% 39%);    clip-path: ellipse(100% 56% @ 71% 39%);    width: 500px;    height: auto;  }
<div class="container">    <img src="http://www.hdwallpapersinn.com/wp-content/uploads/2014/11/sunset-cityscape-scene.jpg" />  </div>

clip path support

svg

you can achieve shape required svg.

body {    background: lightblue;  }
<svg width="500" height="250" viewbox="0 0 100 50">    <defs>      <pattern id="image" patternunits="userspaceonuse" height="50" width="100">        <image x="0" y="0" height="50" width="100" xlink:href="https://31.media.tumblr.com/cd4319a4a4ba642649bcf7936d48eec8/tumblr_inline_mn089qqji71qz4rgp.png"></image>      </pattern>      <filter id="blur" x="0" y="0" width="100%" height="110%">        <feoffset result="offout" in="sourcealpha" dx="0" dy="1" />        <fegaussianblur result="blurout" in="offout" stddeviation="2" />        <feblend in="sourcegraphic" in2="blurout" mode="normal" />      </filter>    </defs>    <g class="curve">      <path fill="url(#image)" filter="url(#blur)" stroke="green" stroke-width="1" d="m-1,-1                l-1,40                c-1,40 60,45 101,42                l101,-1z" />    </g>  </svg>

svg fit use requirements

body {    background: lightblue;    margin: 0;    padding: 0;  }
<svg width="100%" viewbox="0 0 100 50" preserveaspectratio="none" height="150px">    <defs>      <filter id="blur" x="0" y="0" width="100%" height="110%">        <feoffset result="offout" in="sourcealpha" dx="0" dy="1" />        <fegaussianblur result="blurout" in="offout" stddeviation="2" />        <feblend in="sourcegraphic" in2="blurout" mode="normal" />      </filter>    </defs>    <path fill="#ffffff" filter="url(#blur)" stroke="green" stroke-width="1" d="m-1,-1                l-1,40                c-1,40 60,45 101,42                l101,-1z" />  </svg>


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -