div+css实现button按钮悬浮背景旋转动画效果代码

代码语言:html

所属分类:悬停

代码描述:div+css实现button按钮悬浮背景旋转动画效果代码

代码标签: div cs 按钮 悬浮 背景 旋转 动画 button

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />

     <style>
          body{
         background: #212121;
         padding: 200px;

     }
     .button {
  position: relative;
  width: 120px;
  height: 40px;
  background-color: #000;
  display: flex;
  align-items: center;
  color: white;
  flex-direction: column;
  justify-content: center;
  border: none;
  padding: 12px;
  gap: 12px;
  border-radius: 8px;
  cursor: pointer;
}

.button::before {
  content: '';
  position: absolute;
  inset: 0;
  left: -4px;
  top: -1px;
  margin: auto;
 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0