Background
Break News
How to add local font to Tailwind Css and NextJS? - Tutorial Design Pattern? - Blockchain Technology, How to create own Bitcoin virtual currency - Zustand mordern management state - Design Pattern - Flyweight Pattern? - Docker Full training Topic

[Tips] How to make HTML CSS Border Animation Tips and Tricks

Saturday 18 March 2023
|
Read: Completed in minutes

[Tips] How to make HTML CSS Border Animation Tips and Tricks

This topic today is show you how to make HTML CSS Border Animation like below screen shot below, check it out for know how to do it.

Welcome to Webzone, tech tips, i am Zidane. 

Let's go

How to make HTML CSS Border Animation Tips and Tricks


Full source code here

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style> 
        .b {
            font-weight: bold;
            color: orange;
        } 

        a.border-animation:hover{
            background: radial-gradient(white, #7857d0, #3f5efb);
            color: white;
            cursor: pointer;
        }
        a.border-animation {
            width: 120px;
            position: relative;
            margin-top: 50px;
            padding-top: 20px;
            padding-bottom: 20px;
            padding-left: 30px;
            padding-right: 30px;
            box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.4);
            color: yellow;
            background-color: black;
            font-size: 30px;
            text-decoration: none;
            font-weight: bold;
            text-transform: uppercase;
            overflow: hidden;
        }
        
        a.border-animation span:nth-child(1) {
            position: absolute;
            top: 0;
            right: 0;
            width: 100%;
            height: 3px;
            background: linear-gradient(to right, red, green);
            animation: animate1 2s linear infinite;
        }
        
        @keyframes animate1 {
            0% {
                transform: translateX(-100%);
            }
            100% {
                transform: translateX(100%);
            }
        }
        
        a.border-animation span:nth-child(2) {
            position: absolute;
            top: 0;
            right: 0;
            height: 100%;
            width: 3px;
            background: linear-gradient(to bottom, white, blue);
            animation: animate2 2s linear infinite;
            animation-delay: 1s;
        }
        @keyframes animate2 {
            0% {
                transform: translateY(-100%);
            }
            100% {
                transform: translateY(100%);
            }
        }
        
        a.border-animation span:nth-child(3) {
            position: absolute;
            bottom: 0;
            right: 0;
            width: 100%;
            height: 3px;
            background: linear-gradient(to left, pink, grey);
            animation: animate3 2s linear infinite;
        }
        
        @keyframes animate3 {
            0% {
                transform: translateX(100%);
            }
            100% {
                transform: translateX(-100%);
            }
        }
        
        a.border-animation span:nth-child(4) {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            width: 3px;
            background: linear-gradient(to top, rgb(47, 230, 117), orange);
            animation: animate4 2s linear infinite;
            animation-delay: 1s;
        }
        
        @keyframes animate4 {
            0% {
                transform: translateY(100%);
            }
            100% {
                transform: translateY(-100%);
            }
        }
        
    </style>
</head>
<body style="background-color: grey; margin: 20%;">
    
    <div style="font-size: 40px; color: white">
        Learn Tech Tips Blogspot - <span class="b">Z</span>idane <br />
        <span class="b">B</span>order <span class="b">A</span>nimation
    </div>

    <div style="display: grid">
        <a class="border-animation" href="https://learn-tech-tips.blogspot.com" target="_blank">
            <span> </span>
            <span> </span>
            <span> </span>
            <span> </span>
            Search
        </a>
    </div>
    
</body>
</html>
       
Thanks for reading. Any feedback and questions about How to make HTML CSS Border Animation. Leave your comment on below post, we can discuss about it.
✋✋✋✋✋✋ Webzone, tech Tips - I am Zidane, See you next time ✋✋✋✋✋✋



 

 




🙇🏼 We Appreciate Your Comments and Suggestions - Webzone - all things Tech Tips web development 🙇🏼
Popular Webzone Tech Tips topic maybe you will be like it - by Webzone Tech Tips - Zidane
As a student, I found Blogspot very useful when I joined in 2014. I have been a developer for years . To give back and share what I learned, I started Webzone, a blog with tech tips. You can also search for tech tips zidane on Google and find my helpful posts. Love you all,

I am glad you visited my blog. I hope you find it useful for learning tech tips and webzone tricks. If you have any technical issues, feel free to browse my posts and see if they can help you solve them. You can also leave a comment or contact me if you need more assistance. Here is my blog address: https://learn-tech-tips.blogspot.com.

My blog where I share my passion for web development, webzone design, and tech tips. You will find tutorials on how to build websites from scratch, using hot trends frameworks like nestjs, nextjs, cakephp, devops, docker, and more. You will also learn how to fix common bugs on development, like a mini stackoverflow. Plus, you will discover how to easily learn programming languages such as PHP (CAKEPHP, LARAVEL), C#, C++, Web(HTML, CSS, javascript), and other useful things like Office (Excel, Photoshop). I hope you enjoy my blog and find it helpful for your projects. :)

Thanks and Best Regards!
Follow me on Tiktok @learntechtips and send me a direct message. I will be happy to chat with you.
Webzone - Zidane (huuvi168@gmail.com)
I'm developer, I like code, I like to learn new technology and want to be friend with people for learn each other
I'm a developer who loves coding, learning new technologies, and making friends with people who share the same passion. I have been a full stack developer since 2015, with more than years of experience in web development.
Copyright @2022(November) Version 1.0.0 - By Webzone, all things Tech Tips for Web Development Zidane
https://learn-tech-tips.blogspot.com