Home

recent posts

How to create animation social icon using html and CSS | Social icon animation using html and CSS

Animation Social icon Using html and css

Learn How to make a Animation Social icon With hover animation using html and css . latest page UI design with HTML and CSS. Web site Design Tutorial

Video Tutorial

How to use the code in stpe by step

  1. Open Your text Editor(like: VS code, SublimeText or Notepad++)
  2. Create a .html(like: index.html) file
  3. Copy the HTML code the code and past in the index.html file
  4. Then, Create a .css(like: style.css) file
  5. Copy the CSS code and past in style.css file
  6. Open the file in your browser

HTML CODE

HTML is a standard language for web page. With HTML you can create your own website. HTML is easy to learn - You will enjoy it


<!DOCTYPE html>
<html lang="en">
<head>
  <title>Icon hover effect</title>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width,initial-scale=1" />
  <meta name="description" content="" />
  <link rel="stylesheet" type="text/css" href="style.css" />

  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.6.1/font/bootstrap-icons.css">
</head>
<body>
    <div class="cointainer">
      <div class="box">
        <div class="icon instagram">
          <i class="bi bi-instagram"></i>
        </div>
        <p>Instagram</p>
      </div>
      <div class="box">
        <div class="icon facebook">
          <i class="bi bi-facebook"></i>
        </div>
        <p>Facebook</p>
      </div>
      <div class="box">
        <div class="icon twitter">
          <i class="bi bi-twitter"></i>
        </div>
        <p>Twitter</p>
      </div>
      <div class="box">
        <div class="icon whatsapp">
          <i class="bi bi-whatsapp"></i>
        </div>
        <p>WhatsApp</p>
      </div>
    </div>
</body>
</html>

CSS CODE

The Full from of CSS is Cascading Style Sheets. It explains how to show HTML elemnts on display. For web designers, it is powerfull tool to adjust the design and control of the web pages t demonstrate how they should be viewed.

  
	
*{
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body{
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
}

.box{
	width: 55px;
	height: 50px;
	position: relative;
	display: flex;
	align-items: center;
	overflow: hidden;
	padding: 5px;
	cursor: pointer;
	margin: 0.6em;
	transition: all .4s;
}

.box:hover{
	width: 160px;
	background: #c32aa3;
	border-radius: 10px;
	color: #fff;
	box-shadow: 0 0 50px #b315917c;
}

.box:nth-child(2):hover{
	background: #1877f2;
	box-shadow: 0 0 50px #1876f285;
}

.box:nth-child(3):hover{
	background: #1da1f2;
	/* width: 130px; */
	box-shadow: 0 0 50px #1da0f280;
}

.box:nth-child(4):hover{
	background: #25d366;
	box-shadow: 0 0 50px #25d3675e;
}

p{
	transform: translate(60px);
}

.box .icon{
	position: absolute;
	width: 50px;
	height: 50px;
	display: flex;
	justify-content: center;
	align-items: center;
	color: #fff;
	border-radius: 10px;
	margin-right: 10px;
	transition: all .4s;
}

.instagram{
	background: #c32aa3;
}

.whatsapp{
	background: #25d366;
}

.twitter{
	background: #1da1f2;
}

.facebook{
	background: #1877f2;
}

.box:hover .icon{
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.26);
}



No comments:

top navigation

Powered by Blogger.