Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a button with hovering effect #119

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 90 additions & 1 deletion buttons/buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -2308,4 +2308,93 @@ a:focus-visible {
}
}

/*radzhiv's btn end*/
/*radzhiv's btn end*/

/* Sakshi's btn */
h1 {
padding: 50px 0;
font-size: 45px;
text-align: center;
color: rgb(255, 255, 255);
}
:active, :hover, :focus {
outline: 0!important;
outline-offset: 0;
}
::before,
::after {
position: absolute;
content: "";
}

.sakshi2407-btn-1 {
display: flex;
flex-wrap: wrap;
justify-content: center;
max-width: 1000px;
margin: 10px auto 35px;
}
.btn {
position: relative;
display: inline-block;
width: auto; height: auto;
background-color:#ffffff;
border: none;
cursor: pointer;
margin: 0px 25px 15px;
min-width: 150px;
}
.btn span {
position: relative;
display: inline-block;
font-size: 14px;
font-weight: bold;
letter-spacing: 2px;
text-transform: uppercase;
top: 0; left: 0;
width: 100%;
padding: 15px 20px;
transition: 0.3s;
}

.btn.hover-border-6::before,
.btn.hover-border-6::after {
top: 0;
transition: width 0.2s 0.35s ease-out;
}
.btn.hover-border-6::before {
right: 50%;
}
.btn.hover-border-6::after {
left: 50%;
}
.btn.hover-border-6:hover::before,
.btn.hover-border-6:hover::after {
width: 50%;
transition: width 0.2s ease-in;
}

.btn.hover-border-6 span::before,
.btn.hover-border-6 span::after {
width: 0%; height: 0%;
background: transparent;
opacity: 0;
z-index: 2;
transition: width 0.2s ease-in, height 0.15s 0.2s linear, opacity 0s 0.35s;
}
.btn.hover-border-6 span::before {
top: 0; left: 0;
border-left: 7px solid rgb(255, 0, 0);
border-bottom: 7px solid rgb(247, 126, 126);
}
.btn.hover-border-6 span::after {
top: 0; right: 0;
border-right: 7px solid rgb(105, 175, 47);
border-bottom: 7px solid rgb(0, 255, 128);
}
.btn.hover-border-6 span:hover::before,
.btn.hover-border-6 span:hover::after {
width: 50%; height: 96%;
opacity: 1;
transition: height 0.2s 0.2s ease-in, width 0.2s 0.4s linear, opacity 0s 0.2s;
}
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,19 @@
</div>
<!-- radzhiv's btn end -->

<!-- Sakshi's btn start -->
<div class="button-container">
<div class="sakshi2407-btn-1">
<button class="btn btn-4 hover-border-6">
<span>hover me</span>
</button>
</div>
<div class="createdby-section">
Created by<a href="https://github.com/sakshi2407"> Sakshi Sharma</a>
</div>
</div>
<!-- Sakshi's button end -->


</div>

Expand Down