In the project, almost all websites will use buttons, ranging from a dozen to a few. A practical and good-looking button can add a lot of color to the page, thereby attracting the user's attention. When browsing the website, I see some nice-looking and cool buttons. Take them and share them with everyone. If you need to use them next time, just copy them.
HTML part:
<div id="button">
<a class="butt">PUSH</a>
</div>CSS part:
body {background: #ddd;}
#button {
width: 100px;
height: 100px;
border-bottom: 2px solid #eee;
background-image: -webkit-linear-gradient(top, #999, #d0d0d0 80% );
background-image: -moz-linear-gradient(top, #999, #d0d0d0 80% );
background-image: -ms-linear-gradient(top, #999, #d0d0d0 80% );
background-image: -o-linear-gradient(top, #999, #d0d0d0 80% );
background-image: linear-gradient(top, #999, #d0d0d0 80% );
-moz-border-radius: 100px;
-webkit-border-radius: 100px;
border-radius: 100px;
box-shadow: inset rgba(0,0,0,0.2) 0px 5px 6px ;
left: 50%;
top: 50%;
margin-left: -50px;
margin-top: -50px;
position: absolute;
}
.butt {
position: absolute;
width: 80px;
height: 52px;
left: 10px;
top: 10px;
cursor: pointer;
font-family: "Lucida Sans";
font-weight: bold;
font-size: 23px;
color: #888;
text-shadow: 0px 1px 0px #fff;
text-align: center;
padding-top: 28px;
-moz-border-radius: 100px;
-webkit-border-radius: 100px;
border-radius: 100px;
background-image: -webkit-linear-gradient(top, #eee, #bbb 70%, #9f9f9f 100% );
background-image: -moz-linear-gradient(top, #eee, #bbb 70%, #9f9f9f 100% );
background-image: -ms-linear-gradient(top, #eee, #bbb 70%, #9f9f9f 100% );
background-image: -o-linear-gradient(top, #eee, #bbb 70%, #9f9f9f 100% );
background-image: linear-gradient(top, #eee, #bbb 70%, #9f9f9f 100% );
background-position: 0 6px;
background-color: #eee;
background-repeat: no-repeat;
-webkit-box-shadow: rgba(0,0,0,.4) 0 3px 6px;
-moz-box-shadow: rgba(0,0,0,.4) 0 3px 6px;
box-shadow: rgba(0,0,0,.4) 0 3px 6px;
-webkit-transition: all .1s ease-in;
-moz-transition: all .1s ease-in;
-ms-transition: all .1s ease-in;
-o-transition: all .1s ease-in;
transition: all .1s ease-in;
}
.butt:hover {
background-position: 0 0px;
-webkit-box-shadow: rgba(0,0,0,.4) 0 3px 8px;
-moz-box-shadow: rgba(0,0,0,.4) 0 3px 8px;
box-shadow: rgba(0,0,0,.4) 0 3px 8px;
}
.butt:active {
width: 76px;
height: 48px;
margin: 2px 0 0 2px;
border-bottom: 1px solid #fff;
font-size: 21px;
color: #777;
-webkit-box-shadow: inset rgba(0,0,0,.5) 0px 5px 10px;
-moz-box-shadow: inset rgba(0,0,0,.5) 0px 5px 10px;
box-shadow: inset rgba(0,0,0,.5) 0px 5px 10px;
}Rendering:

The above is the detailed content of Share a metallic button style code. For more information, please follow other related articles on the PHP Chinese website!
Weekly Platform News: Web Apps in Galaxy Store, Tappable Stories, CSS SubgridApr 14, 2025 am 11:20 AMIn this week's roundup: Firefox gains locksmith-like powers, Samsung's Galaxy Store starts supporting Progressive Web Apps, CSS Subgrid is shipping in Firefox
Weekly Platform News: Internet Explorer Mode, Speed Report in Search Console, Restricting Notification PromptsApr 14, 2025 am 11:15 AMIn this week's roundup: Internet Explorer finds its way into Edge, Google Search Console touts a new speed report, and Firefox gives Facebook's notification
The Power (and Fun) of Scope with CSS Custom PropertiesApr 14, 2025 am 11:11 AMYou’re probably already at least a little familiar with CSS variables. If not, here’s a two-second overview: they are really called custom properties, you set
We Are ProgrammersApr 14, 2025 am 11:04 AMBuilding websites is programming. Writing HTML and CSS is programming. I am a programmer, and if you're here, reading CSS-Tricks, chances are you're a
How Do You Remove Unused CSS From a Site?Apr 14, 2025 am 10:59 AMHere's what I'd like you to know upfront: this is a hard problem. If you've landed here because you're hoping to be pointed at a tool you can run that tells
An Introduction to the Picture-in-Picture Web APIApr 14, 2025 am 10:57 AMPicture-in-Picture made its first appearance on the web in the Safari browser with the release of macOS Sierra in 2016. It made it possible for a user to pop
Ways to Organize and Prepare Images for a Blur-Up Effect Using GatsbyApr 14, 2025 am 10:56 AMGatsby does a great job processing and handling images. For example, it helps you save time with image optimization because you don’t have to manually
Oh Hey, Padding Percentage is Based on the Parent Element's WidthApr 14, 2025 am 10:55 AMI learned something about percentage-based (%) padding today that I had totally wrong in my head! I always thought that percentage padding was based on the


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver Mac version
Visual web development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool






