Custom code offer camp
Custom Button Hover Effect
- Demo: https://cdn.shopify.com/s/files/1/0631/1424/8341/files/2024-12-26_08.34.29.gif?v=1737384303
- Code:
<style>
.product-btn-atc {
position: relative;
display: inline-block;
padding: 15px 30px;
font-size: 18px;
font-weight: bold;
color: #fff;
background: #000;
border: none;
border-radius: 8px;
cursor: pointer;
overflow: hidden;
outline: none;
transition: transform 0.6s ease-in-out;
}
.product-btn-atc::before {
content: '';
position: absolute;
top: 50%;
left: -150%;
transform: translateY(-50%);
width: 200px;
height: 300%;
background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent 70%);
filter: blur(30px);
animation: none;
z-index: 0;
}
.product-btn-atc:hover {
transform: scale(1.1);
}
.product-btn-atc:hover::before {
animation: move-light 2s infinite linear;
}
@keyframes move-light {
0% {
left: -150%;
}
100% {
left: 150%;
}
}
@keyframes bounce {
0%, 100% {
transform: scale(1.05);
}
50% {
transform: scale(1);
}
}
.product-btn-atc:hover {
animation: bounce 1.5s infinite;
}
</style>
- * *
Button with Pulse Effect and Lightning Animation
- Demo: https://cdn.shopify.com/s/files/1/0631/1424/8341/files/2024-12-25_15.25.13.gif?v=1737384408
- Code:
<style>
.product-btn-atc {
display: inline-block;
text-decoration: none;
color: white;
background: black;
padding: 15px 30px;
font-size: 18px;
font-weight: bold;
border: 2px solid blue;
border-radius: 8px;
position: relative;
cursor: pointer;
box-shadow: 0 0 15px 2px rgba(0, 0, 255, 0.6);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-btn-atc:hover {
box-shadow: 0 0 30px 5px rgba(0, 0, 255, 0.9);
animation: pulse 1s infinite;
}
.product-btn-atc:active {
transform: scale(0.95);
}
.product-btn-atc::after {
content: "⚡";
position: absolute;
top: 50%;
right: 0px;
transform: translateY(0%) scale(0);
color: yellow;
font-size: 20px;
opacity: 0;
pointer-events: none;
animation: none;
}
.product-btn-atc:active::after {
animation: lightning 0.4s ease-out forwards;
}
@keyframes pulse {
0%, 100% {
box-shadow: 0 0 15px 2px rgba(0, 0, 255, 0.6);
}
50% {
box-shadow: 0 0 30px 5px rgba(0, 0, 255, 0.9);
}
}
@keyframes lightning {
0% {
opacity: 1;
transform: translateY(-50%) scale(1);
}
100% {
opacity: 0;
transform: translateY(-50%) scale(1.5);
}
}
</style>
Gradient Button with Ripple Effect
- Demo: https://cdn.shopify.com/s/files/1/0631/1424/8341/files/2024-12-25_15.24.49_3.gif?v=1737384442
- Code:
<style>
.product-btn-atc {
display: inline-block;
text-decoration: none;
color: white;
background: linear-gradient(135deg, #a8edea, #fed6e3);
padding: 15px 30px;
font-size: 16px;
font-weight: bold;
border: none;
border-radius: 25px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
cursor: pointer;
overflow: hidden;
position: relative;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-btn-atc:hover {
transform: scale(1.05);
box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}
.product-btn-atc:active {
transform: scale(0.95);
}
.product-btn-atc::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 20px;
height: 20px;
background: rgba(255, 255, 255, 0.5);
border-radius: 50%;
transform: translate(-50%, -50%) scale(0);
animation: ripple 0.6s ease-out;
pointer-events: none;
}
.product-btn-atc:active::after {
animation: ripple 0.6s ease-out;
}
@keyframes ripple {
0% {
transform: translate(-50%, -50%) scale(0);
opacity: 1;
}
100% {
transform: translate(-50%, -50%) scale(4);
opacity: 0;
}
}
</style>
Layout Change for Header
- Demo: View Demo
- Code:
.header__icons {
order: 2;
}
.header__logo {
order: 1;
}
.header__menu {
order: 3;
}
.header {
display: flex;
justify-content: space-between;
}
- Example: Adjust the layout of header components by changing the order of icons, logo, and menus using CSS.
- * *
Customizing Title Position Below the Image
- Demo: Before Code, After Code
- Code:
.card__content.card__content--inner {
position: relative;
}
- Example: Adjust the title positioning to be below the image by setting the position of the content to relative.
Adding Custom Icon to Add-to-Cart Button
- Demo: View Demo
- Code: Please visit the store for the code reference (theme: 2-0 training theme). Store Link
Updated on: 03/03/2025
Thank you!