Skip to content

Instantly share code, notes, and snippets.

@taojy123
Last active June 17, 2020 10:12
Show Gist options
  • Save taojy123/08a04da151068e5945c8a4478a2bb0f3 to your computer and use it in GitHub Desktop.
Save taojy123/08a04da151068e5945c8a4478a2bb0f3 to your computer and use it in GitHub Desktop.
css 画 button
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.botton-container{
position: absolute;
left: 50%;
top: 45%;
transform: translate(-50%);
}
.button{
display: inline-block;
text-align: center;
text-decoration:none;
width: 100px;
padding: 10px 0;
font-size: 16px;
line-height: 1;
border-radius: 20px;
}
.blue {
background-color: #ecf5ff;
color: #419dff;
}
.blue:hover {
background-color: #419dff;
color: #fff;
}
.green {
background-color: #f0f9ea;
color: #66c23a;
}
.green:hover {
background-color: #66c23a;
color: #fff;
}
</style>
</head>
<body>
<div class="botton-container">
<a class="button blue" href="#">生成预览</a >
<a class="button green" href="#">正式发送</a >
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment