jquery - double border for bottom triagle + fill animation -


i have button in bottom right of site triangle

code:

#top-btn a, #top-btn-bg {   position: fixed;   right: 0;   margin: 0;   }    #top-btn {    z-index: 999;    padding: 30px 30px 25px 35px;    color: #707070;    bottom: 0; right: 0;  }    #top-btn-bg {    display: block;    z-index: 950;    border-width: 0 0 100px 100px;    border-color: transparent transparent red transparent;    border-style: solid;    bottom: 0; right: 0;    width: 0; height: 0;    -webkit-transform:rotate(360deg);  }
<div id="top-btn">    <a href="...">up</a>    <div id="top-btn-bg"></div>  </div>	

i want add 1px color: #000; border outside of triangle (just top left edge)

i animate triangle in bottom right on hover, feature less important.

updated answer per comment

am not sure (just top left edge) want.?

i have used : before achieving this, have put transition you, hope helpful if there more please ask me.

change value of transition make animation slow , fast.

transition: 0.6s ease-in-out; 

#top-btn a,  #top-btn-bg {    position: fixed;    right: 0;    margin: 0;  }    #top-btn {    z-index: 999;    padding: 30px 30px 25px 35px;    color: #707070;    bottom: 0;    right: 0;  }    #top-btn-bg {    display: block;    z-index: -7;    bottom: -30px;    right: -70px;    width: 172px;    height: 100px;    transform: rotate(135deg);    background: transparent;    overflow:hidden;    border-bottom: 1px solid #000;  }    #top-btn-bg:after {    content: '';    display: block;    z-index: 950;    border-width: 0 0 124px 125px;    border-color: transparent transparent red transparent;    border-style: solid;        bottom: 100px;    right: -2%;    width: 42px;    height: 0;    position: relative;    transition: 0.6s ease-in-out;  }    #top-btn a:hover+#top-btn-bg:after,#top-btn-bg:hover:after {    bottom: 15px;  }
<div id="top-btn">    <a href="...">up</a>    <div id="top-btn-bg"></div>  </div>


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -