DevPlatform
Home
Components
Search
Submit
Earn
Login
Sign Up Free
Slice Effect - Preview | DevPlatform
DevPlatform
Categories
Accordion
Animation
Box Shadow
Button
Card
Footer
Form
Gallery
Hero Section
Inputs
Loader
Marquee
Modal
Modules
Navbar
Progress Bar
Radio Buttons
Search-Bar
Sections
Slider
Tab
Timeline
Toggle
Slice Effect
abhishek001
Jan 25, 2026
2
0
Share
Live Preview
Refresh
Live Editor
HTML
CSS
JS
HTML
CSS
JavaScript
1
<div class="container"> <button class="btn-slice"> <span class="slice slice-1"></span> <span class="slice slice-2"></span> <span class="slice slice-3"></span> <span class="slice slice-4"></span> <span class="slice slice-5"></span> <span class="text">Slice Effect</span> </button> </div>
1
* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', sans-serif; background: #16213e; min-height: 100vh; display: flex; align-items: center; justify-content: center; } .btn-slice { position: relative; padding: 1.5rem 3.5rem; font-size: 1.1rem; font-weight: 600; color: #fff; background: transparent; border: 2px solid #00d4ff; border-radius: 12px; cursor: pointer; overflow: hidden; } .slice { position: absolute; top: 0; left: 0; width: 20%; height: 100%; background: linear-gradient(135deg, #00d4ff, #7b2ff7); transform: translateY(-100%); transition: transform 0.4s ease; } .slice-1 { left: 0%; transition-delay: 0s; } .slice-2 { left: 20%; transition-delay: 0.05s; } .slice-3 { left: 40%; transition-delay: 0.1s; } .slice-4 { left: 60%; transition-delay: 0.15s; } .slice-5 { left: 80%; transition-delay: 0.2s; } .btn-slice:hover .slice { transform: translateY(0); } .text { position: relative; z-index: 1; } .btn-slice:hover { color: #fff; border-color: transparent; }
1
Comments
0
Want to comment?
Please
login
or
sign up
to post comments.
No comments yet
Be the first to comment on this component!
Comments 0
Want to comment?
Please login or sign up to post comments.
No comments yet
Be the first to comment on this component!