项目作者: code-fx

项目描述 :
Pure CSS3 animated border for all html element.
高级语言: CSS
项目地址: git://github.com/code-fx/Pure-CSS3-Animated-Border.git
创建时间: 2017-10-28T18:52:35Z
项目社区:https://github.com/code-fx/Pure-CSS3-Animated-Border

开源协议:MIT License

下载


pure-css-animated-border

A pure css3 animated border which supports all moden browser.

  1. https://cdn.jsdelivr.net/gh/code-fx/Pure-CSS3-Animated-Border@V1.0/css/animated-border/animated-border.min.css

NPM

  1. npm i pure-css3-animated-border

See the online demo.


Sponsered By Codesponsor

1,2 Line Animated Boder Examples

  1. <a href="ui-box top-leftToRight">
  2. Animated Hyperlink Border
  3. </a>
  4. <div class="ui-box bottom-rightToLeft">
  5. Animated Div Border
  6. </a>
  7. <button class="ui-box left-bottomToTop">
  8. Animated Button Border
  9. </button>
  10. <p class="ui-box right-topToBottom">
  11. Animated Paragraph Border
  12. </p>
  1. Modify border style, color, width and easing
  2. <style>
  3. //top border
  4. .top-leftToRight:before{
  5. border-top: 1px solid Tomato;
  6. transition-timing-function: linear;
  7. }
  8. //bottom border
  9. .bottom-rightToLeft:after{
  10. border-bottom: 1px solid DodgerBlue;
  11. transition-timing-function: ease-in;
  12. }
  13. //left border
  14. .left-bottomToTop:before{
  15. border-left: 1px solid smokeWhite;
  16. transition-timing-function: ease-out;
  17. }
  18. //right border
  19. .right-topToBottom:after{
  20. border-right: 1px solid MediumSeaGreen;
  21. transition-timing-function: ease-in-out;
  22. }
  23. </style>

4 Line Animated Boder Example

  1. <a href="ui-box top-leftStart">
  2. <span class='ui-border-element'>
  3. Animated Hyperlink
  4. </span>
  5. </a>
  1. Modify border style, color, width and easing
  2. <style>
  3. //top border
  4. .top-leftStart:before{
  5. border-top: 1px solid Tomato;
  6. transition-timing-function: linear;
  7. }
  8. //bottom border
  9. .top-leftStart:after{
  10. border-bottom: 1px solid DodgerBlue;
  11. transition-timing-function: ease-in;
  12. }
  13. //left border
  14. .top-leftStart .ui-border-element:before{
  15. border-left: 1px solid smokeWhite;
  16. transition-timing-function: ease-out;
  17. }
  18. //right border
  19. .top-leftStart .ui-border-element:after{
  20. border-right: 1px solid MediumSeaGreen;
  21. transition-timing-function: ease-in-out;
  22. }
  23. </style>

Animated Border Class Name

Class Name Use Span
.ui-box .topBottom-leftRightCorner <span class='ui-border-element'> Your Content... </span>
.ui-box .topBottom-rightLeftCorner <span class='ui-border-element'> Your Content... </span>
.ui-box .forwardBorderTrain <span class='ui-border-element'> Your Content... </span>
.ui-box .backwardBorderTrain <span class='ui-border-element'> Your Content... </span>
.ui-box .border-inOutSpread <span class='ui-border-element'> Your Content... </span>
.ui-box .slideOpposite <span class='ui-border-element'> Your Content... </span>
.ui-box .top-leftToRight
.ui-box .right-topToBottom
.ui-box .bottom-rightToLeft
.ui-box .left-bottomToTop
.ui-box .top-rightToLeft
.ui-box .right-bottomToTop
.ui-box .bottom-leftToRight
.ui-box .left-topToBottom
.ui-box .top-inOutSpread
.ui-box .right-inOutSpread
.ui-box .bottom-inOutSpread
.ui-box .left-inOutSpread
.ui-box .top-slideOpposite
.ui-box .right-slideOpposite
.ui-box .bottom-slideOpposite
.ui-box .left-slideOpposite
.ui-box .top-leftStart <span class='ui-border-element'> Your Content... </span>
.ui-box .top-rightStart <span class='ui-border-element'> Your Content... </span>
.ui-box .bottom-rightStart <span class='ui-border-element'> Your Content... </span>
.ui-box .bottom-leftStart <span class='ui-border-element'> Your Content... </span>
.ui-box .top-leftStart-backward <span class='ui-border-element'> Your Content... </span>
.ui-box .top-rightStart-backward <span class='ui-border-element'> Your Content... </span>
.ui-box .bottom-rightStart-backward <span class='ui-border-element'> Your Content... </span>
.ui-box .bottom-leftStart-backward <span class='ui-border-element'> Your Content... </span>
.ui-box .top-leftStart-burst <span class='ui-border-element'> Your Content... </span>
.ui-box .top-rightStart-burst <span class='ui-border-element'> Your Content... </span>
.ui-box .bottom-rightStart-burst <span class='ui-border-element'> Your Content... </span>
.ui-box .bottom-leftStart-burst <span class='ui-border-element'> Your Content... </span>
.ui-box .top-leftStart-burst-backward <span class='ui-border-element'> Your Content... </span>
.ui-box .top-rightStart-burst-backward <span class='ui-border-element'> Your Content... </span>
.ui-box .bottom-rightStart-burst-backward <span class='ui-border-element'> Your Content... </span>
.ui-box .bottom-leftStart-burst-backward <span class='ui-border-element'> Your Content... </span>
.ui-box .top-stay <span class='ui-border-element'> Your Content... </span>
.ui-box .right-stay <span class='ui-border-element'> Your Content... </span>
.ui-box .bottom-stay <span class='ui-border-element'> Your Content... </span>
.ui-box .left-stay <span class='ui-border-element'> Your Content... </span>

Donate Now.