css代码|悬浮按键代码(css悬浮按钮)

时间:2023-07-29 03:40:53   阅读:382

一个悬浮的按钮代码

<style>
/* 设置按钮样式 */
.button {
  display: none; /* 默认隐藏按钮 */
  position: fixed; /* 将按钮固定在页面上 */
  bottom: 220px; /* 距离底部的距离为20像素 */
  right: 620px; /* 距离右侧的距离为20像素 */
  width: 100px; /* 初始按钮宽度为100像素 */
  height: 40px; /* 初始按钮高度为40像素 */
  background-color: #800080; /* 设置按钮背景颜色为紫色 */
  color: #FFFFFF; /* 设置按钮字体颜色为白色 */
  text-align: center; /* 文字居中对齐 */
  line-height: 40px; /* 设置文字行高与按钮高度相等,使文字垂直居中 */
  font-size: 16px; /* 设置文字大小为16像素 */
  cursor: pointer; /* 鼠标悬停在按钮上时显示手型光标 */
  text-decoration: none; /* 去除下划线 */
  border-radius: 20px; /* 设置按钮为圆角 */
  animation: pulse 2s infinite alternate; /* 添加动画效果 */
}

/* 在PC端显示按钮 */
@media screen and (min-width: 768px) {
  .button {
    display: block;
  }
}

/* 在移动设备上隐藏按钮 */
@media screen and (max-width: 767px) {
  .button {
    display: none;
  }
}

/* 按钮放大缩小动画效果 */
@keyframes pulse {
  0% {
    transform: scale(1); /* 初始大小为正常尺寸 */
  }
  50% {
    transform: scale(1.2); /* 放大到1.2倍大小 */
  }
  100% {
    transform: scale(1); /* 缩小回正常尺寸 */
  }
}
</style>



<a href="/faka/qq.html" class="button">启动外挂</a>


css代码|悬浮按键代码(css悬浮按钮)

上一篇:7月29日,星期六,在这里每天60秒读懂世界!(7月6日是世界什么日)

下一篇:强大的开源代码蓝天采集器-网站采集小专家(蓝天采集器规则下载)

网友评论