css - How to add shadow to rounded corners -


i trying add shadow circle using

box-shadow: 1px 1px 3px 10px black; 

, comes square border . how can add shadow circle.

.circle {    position: relative;    display: block;    margin: 2em 0;    background-color: transparent;    color: #fff;    text-align: center;    width: 40%;      margin: 0 auto;    box-shadow: 1px 1px 3px 10px black;        }    .circle:after {    display: block;    padding-bottom: 100%;    width: 100%;    height: 0;    border-radius: 50%;    background-color: #1e73be;    content: "";  }    .circle__inner {    position: absolute;    top: 0;    bottom: 0;    left: 0;    width: 100%;    height: 100%;  }    .circle__wrapper {    display: table;    width: 100%;    height: 100%;  }    .circle__content {    display: table-cell;    padding: 1em;    vertical-align: middle;  }
<div class="circle">  <div class="circle__inner">  <div class="circle__wrapper">  <div class="circle__content">this responsive circle</div>  </div>  </div>  </div>

add border-radius: 50%; .circle

jsfiddle

css

.circle {   position: relative;   display: block;   margin: 2em 0;   background-color: transparent;   color: #fff;   text-align: center;   width: 40%;     margin: 0 auto;   box-shadow: 1px 1px 3px 10px black;   -webkit-border-radius: 50%;   -moz-border-radius: 50%;   border-radius: 50%;  } 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -