html5 - How can I replicate this with css? -
so playing around css, , wanted give titles specific style. thinking image made here:
i tried google people wanted same, couldn't find looking for.
this have far:
.test {    position: relative;    font-size:40px;    height:40px;    width:400px;  }  .test>span {    display: block;    overflow: hidden;    position: absolute;    left: 0;    width: 100%;    height: 60%;    color: #31ff5a;  }  .test>.top{    z-index:2;    top:0;  }  .test>.bottom{    color: black;    height: 100%;    z-index:1;    bottom: 0;  }  <div class="test">    <span class="top">text</span>    <span class="bottom">text</span>  </div>  any 1 of can me out? or atleast in right direction :p
thanks!
use border radius property.
.test {    position: relative;    font-size:40px;    height:40px;    width:400px;  }  .test>span {      display: block;      overflow: hidden;      position: absolute;      left: 0;      width: 100%;      /* height: 60%; */      color: #31ff5a;      border-bottom-left-radius: 90%;  }  .test>.top{    z-index:2;    top:0;  }  .test>.bottom {      color: black;      height: 100%;      z-index: 1;      bottom: 0;      border-bottom-right-radius: 346%;  }  <div class="test">    <span class="top">text</span>    <span class="bottom">text</span>  </div>  
Comments
Post a Comment