svg-circle-with-icon

svg-circle-with-icon

by pj_js15

HTML

<div>
    <svg>
        <line id="line" y1="39" x1="30" y2="39" x2="120" stroke-width="1.5" stroke="#CCC" />
        <circle cx="40" cy="40" r="35"/>
        <div class='sampleText'>
            <text x="9" y="30" fill="#FFFFFF">Notify Claim</text>
        </div>
          
          
              
    </svg>

<!--
    <div class='callout'>
        <div class='arrow-up-container'>
            <div class="triangle-up"></div>        
        </div>
    
        <div class='moreInfo'>
            This is a dummy text.
        </div>
    </div>
    -->
    
</div>

CSS

*{
    font-family: Arial;
}
svg{
    width: 125px;
    height: 80px;
}
circle{
    cursor: pointer;
    fill: #512E8B;
    stroke:none;
}
svg.div{
    margin:0;
    padding:0;
}
div.sampleText {
    width: 50px;
    position: absolute;
    top: 27px;
    left: 23px;
    text-align: center;
    color: #FFF;
}

div {
    float:left;
    margin:0.5%;
}

/*Up pointing*/
.triangle-up {
    width: 10%;
    height: 0;    
    padding-left:10%;
    padding-bottom: 10%;
    overflow: hidden;
}
.triangle-up:after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    margin-left:-200px;
    border-left: 200px solid transparent;
    border-right: 150px solid transparent;
    border-bottom: 200px solid #4679BD;
}
.arrow-up-container{
    position: relative;
    top: -55px;
    left: 18px;
}
.moreInfo{
    margin: 0;
    padding: 0;
    background-color: #4679BD;
    position: relative;
    top: -58px;
    padding: 20px;
    color: #FFF;
    -webkit-border-radius:7px; 
    -moz-border-radius:7px; 
    border-radius:7px;
}