html+css实现立体按钮

在html中button设置class为 lu-btn-3d

a标签设置class为 lu-btn-3d lu-a-3d

请查看下方代码和效果图

.lu-btn-3d{
  width: 100px;
  height: 40px;
  background: linear-gradient(to bottom, #4eb5e5 0%,#389ed5 100%); 
  border: none;
  border-radius: 5px;
  position: relative;
  border-bottom: 5px solid #2b8bc6;
  color: #fbfbfb;
  font-weight: 600;
  font-family: 'Open Sans', sans-serif;
  text-shadow: 1px 1px 1px rgba(0,0,0,.4);
  font-size: 15px;
  text-align: center;
  box-shadow: 0px 3px 0px rgba(0,0,0,.2);
  cursor: pointer;
}
.lu-btn-3d:active {
  box-shadow: 0px 2px 0px rgba(0,0,0,.2);
  top: 1px;
}
.lu-a-3d{
background: linear-gradient(to bottom, #f00 0%,#ff9999 100%); 
 border-bottom: 5px solid #ff3300;
display: block;
width:100px;
line-height:40px;

}

 html+css实现立体按钮_第1张图片

 

你可能感兴趣的:(css)