Welcome to All Things GHL - Your Go To Resources for Code Snippets

Border Animation

Customize the animation around a box.

@property --border-gradient-angle {
    syntax: "<angle>";
    inherits: true;
    initial-value: 0turn;
}

@keyframes rotateBG {
    0% {
        --border-gradient-angle: 0turn;
    }

    100% {
        --border-gradient-angle: 1turn;
    }
}

.border-animation {
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    position: relative;
    background-image: conic-gradient(from var(--border-gradient-angle) at 50% 50%, transparent, #ffa057 14%, #ffe0c2 15%, transparent 17%);
    background-size: contain;
    background-color: black;
    animation: rotateBG 9s linear infinite;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px!important;
}

.border-animation:before {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    z-index: 0;
    background: #fff;
    border-radius: .5rem;
}

Instructions

  1. Paste code into Custom CSS.

  2. Apply the border-animation class to any row element by selecting the row

  3. Selecting Advanced, and then entering border-animation in the Custom CSS box

Last updated

Was this helpful?